summaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-13 23:14:28 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-13 23:14:28 -0800
commit71907d33e4b23eb6248a8ec664e0c04a12723630 (patch)
tree921d88729ff44c7fbedabee3575a242cc7a099df /js/lib
parent9b2687b151c78bdaa8553fcc3130bacb7d25f582 (diff)
Removed an implicit cast in node.js 'next'.
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/node.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/lib/node.js b/js/lib/node.js
index c90c3e9..9fc71c7 100644
--- a/js/lib/node.js
+++ b/js/lib/node.js
@@ -27,7 +27,7 @@ var next = function(){
var cur = this.current;
var entering = this.entering;
- if (!cur) {
+ if (cur === null) {
return null;
}
@@ -42,13 +42,13 @@ var next = function(){
this.entering = false;
}
- } else if (cur.next) {
- this.current = cur.next;
- this.entering = true;
-
- } else {
+ } else if (cur.next === null) {
this.current = cur.parent;
this.entering = false;
+
+ } else {
+ this.current = cur.next;
+ this.entering = true;
}
return {entering: entering, node: cur};