Permalink
Browse files

lib: change == to === in linkedlist

Also removed a TODO comment that is no longer viable and left a note
about the potentially confusing property naming convention for future
readers.

PR-URL: #9362
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
  • Loading branch information...
jedireza authored and silverwind committed Oct 29, 2016
1 parent e658f5b commit 62d8134c50a1f65d6c0ae139e60e0cac701c8a84
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/internal/linkedlist.js
@@ -16,7 +16,7 @@ exports.create = create;
// show the most idle item
function peek(list) {
if (list._idlePrev == list) return null;
if (list._idlePrev === list) return null;
return list._idlePrev;
}
exports.peek = peek;
@@ -54,7 +54,7 @@ function append(list, item) {
}
// items are linked with _idleNext -> (older) and _idlePrev -> (newer)
// TODO: swap the linkage to match the intuitive older items at "prev"
// Note: This linkage (next being older) may seem counter-intuitive at first.
item._idleNext = list._idleNext;
item._idlePrev = list;

0 comments on commit 62d8134

Please sign in to comment.