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 ||
name.length < 3 ||
candidateName === "eval" ||
candidateName === "Intl" ||
candidateName === "intl" ||
candidateName === "undefined" ||
candidateName === "Map" ||
candidateName === "NaN" ||
candidateName === "Set") {
candidateName === "map" ||
candidateName === "nan" ||
candidateName === "set") {
continue;
}
const distance = levenshtein(candidateName, name);
const distance = levenshtein(name, candidateName);
if (distance > worstDistance) {
continue;
}