Skip to content

Commit 679a1a2

Browse files
committed
Normalize inputs before comparing in item_in
1 parent 4de3a4c commit 679a1a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

notebook/static/tree/js/notebooklist.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ define([
2525
};
2626

2727
var item_in = function(item, list) {
28-
return list.indexOf(item) != -1;
28+
// Normalize list and item to lowercase
29+
var normalized_list = list.map(function(_item) {
30+
return _item.toLowerCase();
31+
});
32+
return normalized_list.indexOf(item.toLowerCase()) != -1;
2933
};
3034

3135
var includes_extension = function(filepath, extensionslist) {

0 commit comments

Comments
 (0)