Skip to content

Commit

Permalink
lib: change == to === in linkedlist
Browse files Browse the repository at this point in the history
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 Myles Borins committed Nov 22, 2016
1 parent 5e1fd28 commit a178abf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/linkedlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit a178abf

Please sign in to comment.