- Commit
- 71907d33e4b23eb6248a8ec664e0c04a12723630
- Parent
- 9b2687b151c78bdaa8553fcc3130bacb7d25f582
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Removed an implicit cast in node.js 'next'.
My personal build of CMark ✏️
Removed an implicit cast in node.js 'next'.
1 file changed, 6 insertions, 6 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/lib/node.js | 12 | 6 | 6 |
diff --git 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};