Skip to content

Commit a178abf

Browse files
jedirezaMyles Borins
authored and
Myles Borins
committed
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 <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent 5e1fd28 commit a178abf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/linkedlist.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports.create = create;
1616

1717
// show the most idle item
1818
function peek(list) {
19-
if (list._idlePrev == list) return null;
19+
if (list._idlePrev === list) return null;
2020
return list._idlePrev;
2121
}
2222
exports.peek = peek;
@@ -54,7 +54,7 @@ function append(list, item) {
5454
}
5555

5656
// items are linked with _idleNext -> (older) and _idlePrev -> (newer)
57-
// TODO: swap the linkage to match the intuitive older items at "prev"
57+
// Note: This linkage (next being older) may seem counter-intuitive at first.
5858
item._idleNext = list._idleNext;
5959
item._idlePrev = list;
6060

0 commit comments

Comments
 (0)