diff --git a/lib/internal/linkedlist.js b/lib/internal/linkedlist.js index 15f06c0efe8f05..40bca91de25803 100644 --- a/lib/internal/linkedlist.js +++ b/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;