mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 10:00:13 -06:00
dropped redundand type assertion, added mising check
This commit is contained in:
parent
cb472eb52c
commit
03cb645573
@ -7519,10 +7519,10 @@ module ts {
|
||||
return undefined;
|
||||
}
|
||||
var property = getPropertyOfObjectType(enumType, propertyName);
|
||||
if (!(property.flags & SymbolFlags.EnumMember)) {
|
||||
if (!property || !(property.flags & SymbolFlags.EnumMember)) {
|
||||
return undefined;
|
||||
}
|
||||
var propertyDecl = <EnumMember>property.valueDeclaration;
|
||||
var propertyDecl = property.valueDeclaration;
|
||||
// self references are illegal
|
||||
if (member === propertyDecl) {
|
||||
return undefined;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user