We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
symbol.parent
1 parent 67c6ceb commit 0c5878dCopy full SHA for 0c5878d
src/services/rename.ts
@@ -24,7 +24,7 @@ namespace ts.Rename {
24
}
25
26
// Cannot rename `default` as in `import { default as foo } from "./someModule";
27
- if (isIdentifier(node) && node.originalKeywordKind === SyntaxKind.DefaultKeyword && symbol.parent!.flags & SymbolFlags.Module) {
+ if (isIdentifier(node) && node.originalKeywordKind === SyntaxKind.DefaultKeyword && symbol.parent && symbol.parent.flags & SymbolFlags.Module) {
28
return undefined;
29
30
0 commit comments