Even in javascript files when creating completion entry from symbols we need to perform identifier check

Fixes #11217
This commit is contained in:
Sheetal Nandi
2016-10-05 13:46:47 -07:00
parent ffe07e7e71
commit f30874763f
2 changed files with 72 additions and 1 deletions

View File

@@ -4371,7 +4371,7 @@ namespace ts {
const entries: CompletionEntry[] = [];
if (isSourceFileJavaScript(sourceFile)) {
const uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ false);
const uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true);
addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames));
}
else {