refactor(static_reflector): remove unnecessary check.
This commit is contained in:
parent
3a40cb1a85
commit
ba62fe974b
|
@ -331,12 +331,8 @@ export class StaticReflector implements ReflectorReader {
|
||||||
let declarationValue =
|
let declarationValue =
|
||||||
isPresent(moduleMetadata) ? moduleMetadata['metadata'][staticSymbol.name] : null;
|
isPresent(moduleMetadata) ? moduleMetadata['metadata'][staticSymbol.name] : null;
|
||||||
if (isPresent(declarationValue)) {
|
if (isPresent(declarationValue)) {
|
||||||
if (isClassMetadata(declarationValue)) {
|
|
||||||
result = staticSymbol;
|
|
||||||
} else {
|
|
||||||
result = _this.simplify(staticSymbol, declarationValue);
|
result = _this.simplify(staticSymbol, declarationValue);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
case "class":
|
case "class":
|
||||||
return context;
|
return context;
|
||||||
|
@ -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},
|
function mapStringMap(input: {[key: string]: any},
|
||||||
transform: (value: any, key: string) => any): {[key: string]: any} {
|
transform: (value: any, key: string) => any): {[key: string]: any} {
|
||||||
if (isBlank(input)) return {};
|
if (isBlank(input)) return {};
|
||||||
|
|
Loading…
Reference in New Issue