mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Fix bug when augmenting parent-less symbol (#28345)
This commit is contained in:
@@ -26751,7 +26751,7 @@ namespace ts {
|
||||
let reportError = !(symbol.flags & SymbolFlags.Transient);
|
||||
if (!reportError) {
|
||||
// symbol should not originate in augmentation
|
||||
reportError = isExternalModuleAugmentation(symbol.parent!.declarations[0]);
|
||||
reportError = !!symbol.parent && isExternalModuleAugmentation(symbol.parent.declarations[0]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user