Skip to content

Commit c04faa1

Browse files
Merge pull request #27485 from IllusionMH/fix-completionInfo-exception-27338
Use safe some function to handle undefined declarations (fixes #27338)
2 parents 1e55d65 + d0abd39 commit c04faa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/completions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ namespace ts.Completions {
13971397
if (resolvedModuleSymbol !== moduleSymbol &&
13981398
// Don't add another completion for `export =` of a symbol that's already global.
13991399
// So in `declare namespace foo {} declare module "foo" { export = foo; }`, there will just be the global completion for `foo`.
1400-
resolvedModuleSymbol.declarations.some(d => !!d.getSourceFile().externalModuleIndicator)) {
1400+
some(resolvedModuleSymbol.declarations, d => !!d.getSourceFile().externalModuleIndicator)) {
14011401
symbols.push(resolvedModuleSymbol);
14021402
symbolToOriginInfoMap[getSymbolId(resolvedModuleSymbol)] = { kind: SymbolOriginInfoKind.Export, moduleSymbol, isDefaultExport: false };
14031403
}

0 commit comments

Comments
 (0)