From 71907d33e4b23eb6248a8ec664e0c04a12723630 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 13 Jan 2015 23:14:28 -0800 Subject: Removed an implicit cast in node.js 'next'. --- js/lib/node.js | 12 ++++++------ 1 file 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}; -- cgit v1.2.3