mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
dropped redundand type assertion, added mising check
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user