Normalize inputs before comparing in item_in

This commit is contained in:
Grant Nestor 2017-10-09 11:39:07 -07:00
parent 4de3a4cc61
commit 679a1a2985

View File

@ -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) {