refactor(static_reflector): remove unnecessary check.

This commit is contained in:
Tobias Bosch 2016-05-02 16:45:58 -07:00 committed by Alex Eagle
parent 3a40cb1a85
commit ba62fe974b
1 changed files with 1 additions and 9 deletions

View File

@ -331,11 +331,7 @@ export class StaticReflector implements ReflectorReader {
let declarationValue =
isPresent(moduleMetadata) ? moduleMetadata['metadata'][staticSymbol.name] : null;
if (isPresent(declarationValue)) {
if (isClassMetadata(declarationValue)) {
result = staticSymbol;
} else {
result = _this.simplify(staticSymbol, declarationValue);
}
result = _this.simplify(staticSymbol, declarationValue);
}
return result;
case "class":
@ -391,10 +387,6 @@ export class StaticReflector implements ReflectorReader {
}
}
function isClassMetadata(expression: any): boolean {
return !isPrimitive(expression) && !isArray(expression) && expression['__symbolic'] == 'class';
}
function mapStringMap(input: {[key: string]: any},
transform: (value: any, key: string) => any): {[key: string]: any} {
if (isBlank(input)) return {};