diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-13 23:14:28 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-13 23:14:28 -0800 |
commit | 71907d33e4b23eb6248a8ec664e0c04a12723630 (patch) | |
tree | 921d88729ff44c7fbedabee3575a242cc7a099df /js/lib | |
parent | 9b2687b151c78bdaa8553fcc3130bacb7d25f582 (diff) |
Removed an implicit cast in node.js 'next'.
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/node.js | 12 |
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}; |