mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Check for undefined symbols
This commit is contained in:
@@ -2216,7 +2216,7 @@ namespace ts {
|
||||
classPrototype.parent = leftSideOfAssignment;
|
||||
|
||||
let funcSymbol = container.locals.get(constructorFunction.text);
|
||||
if (isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
|
||||
if (funcSymbol && isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
|
||||
funcSymbol = (funcSymbol.valueDeclaration as VariableDeclaration).initializer.symbol;
|
||||
}
|
||||
|
||||
@@ -2246,7 +2246,7 @@ namespace ts {
|
||||
target.parent = leftSideOfAssignment;
|
||||
|
||||
let funcSymbol = container.locals.get(target.text);
|
||||
if (isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
|
||||
if (funcSymbol && isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
|
||||
funcSymbol = (funcSymbol.valueDeclaration as VariableDeclaration).initializer.symbol;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user