Skip to content

Commit 0c10098

Browse files
committed
Fix case of suggestion blacklist.
It should be all lowercase since candidates have been lowercased by the point the blacklist is checked.
1 parent 5a7e967 commit 0c10098

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/compiler/checker.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14227,14 +14227,14 @@ namespace ts {
1422714227
if (candidateName.length < 3 ||
1422814228
name.length < 3 ||
1422914229
candidateName === "eval" ||
14230-
candidateName === "Intl" ||
14230+
candidateName === "intl" ||
1423114231
candidateName === "undefined" ||
14232-
candidateName === "Map" ||
14233-
candidateName === "NaN" ||
14234-
candidateName === "Set") {
14232+
candidateName === "map" ||
14233+
candidateName === "nan" ||
14234+
candidateName === "set") {
1423514235
continue;
1423614236
}
14237-
const distance = levenshtein(candidateName, name);
14237+
const distance = levenshtein(name, candidateName);
1423814238
if (distance > worstDistance) {
1423914239
continue;
1424014240
}

0 commit comments

Comments
 (0)