Skip to content

Commit d0abd39

Browse files
committed
Use safe some function to handle undefined declarations (fixes #27338)
1 parent d2647a1 commit d0abd39

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)