mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix bug: symbol.valueDeclaration not guaranteed to be defined (#26267)
This commit is contained in:
@@ -20861,7 +20861,7 @@ namespace ts {
|
||||
// If func.parent is a class and symbol is a (readonly) property of that class, or
|
||||
// if func is a constructor and symbol is a (readonly) parameter property declared in it,
|
||||
// then symbol is writeable here.
|
||||
return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent);
|
||||
return !symbol.valueDeclaration || !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user