From 92ebcef32628e3a64d923acb1a8e8662c11ca5e8 Mon Sep 17 00:00:00 2001 From: jedireza Date: Sat, 29 Oct 2016 15:54:27 -0700 Subject: [PATCH] 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. --- lib/internal/linkedlist.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;