Fix case of suggestion blacklist.

It should be all lowercase since candidates have been lowercased by the
point the blacklist is checked.
This commit is contained in:
Nathan Shively-Sanders 2017-05-03 15:28:08 -07:00
parent 5a7e967628
commit 0c10098c66

View file

@ -14227,14 +14227,14 @@ namespace ts {
if (candidateName.length < 3 || if (candidateName.length < 3 ||
name.length < 3 || name.length < 3 ||
candidateName === "eval" || candidateName === "eval" ||
candidateName === "Intl" || candidateName === "intl" ||
candidateName === "undefined" || candidateName === "undefined" ||
candidateName === "Map" || candidateName === "map" ||
candidateName === "NaN" || candidateName === "nan" ||
candidateName === "Set") { candidateName === "set") {
continue; continue;
} }
const distance = levenshtein(candidateName, name); const distance = levenshtein(name, candidateName);
if (distance > worstDistance) { if (distance > worstDistance) {
continue; continue;
} }