From 679a1a2985063d6e5f5eca13a8cda9be8cddf3da Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Mon, 9 Oct 2017 11:39:07 -0700 Subject: [PATCH] Normalize inputs before comparing in `item_in` --- notebook/static/tree/js/notebooklist.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notebook/static/tree/js/notebooklist.js b/notebook/static/tree/js/notebooklist.js index f9edf80fe..a821a0678 100644 --- a/notebook/static/tree/js/notebooklist.js +++ b/notebook/static/tree/js/notebooklist.js @@ -25,7 +25,11 @@ define([ }; var item_in = function(item, list) { - return list.indexOf(item) != -1; + // Normalize list and item to lowercase + var normalized_list = list.map(function(_item) { + return _item.toLowerCase(); + }); + return normalized_list.indexOf(item.toLowerCase()) != -1; }; var includes_extension = function(filepath, extensionslist) {