aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-01-20 22:33:53 -0500
committerHolden Rohrer <hr@hrhr.dev>2020-01-20 22:33:53 -0500
commit12c68f4e7f5ad3fe940044c563f3638370ed40e9 (patch)
treede531b346c66550df5286b9d3e96aaf12ecde9ea
parent81e56d2884b137bad94af14f87d000e94363e935 (diff)
minor jarvis changes
-rw-r--r--examples/jarvis.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js
index 9f4e529..04c12db 100644
--- a/examples/jarvis.js
+++ b/examples/jarvis.js
@@ -49,9 +49,9 @@ function tileHandler(send, source, tiles){
}
//// "userspace" functions for responses, like to tileUpdates
-var command = 'jarvis'
-var sig = 'feynmansfedora'
-var notifsrc = '\
+const command = 'jarvis'
+const sig = 'feynmansfedora'
+const notifsrc = '\
\n\
For a node.js YWOT api: \n\
& git.hrhr.dev/ywot-clean \n\
@@ -78,7 +78,7 @@ function notifRefresh(){
let diff = newnotif.copy();
if (typeof notif !== 'undefined') diff.comb(notif, comb.sub);
notif = newnotif;
- claims.unclaim(notifClaim);
+ if (notifClaim) claims.unclaim(notifClaim);
notifClaim = claims.claim(newnotif, protectArea);
return (diff.towrite());
}