fix(compiler): fix simplify a reference without a name

closes #13470
This commit is contained in:
Victor Berchet
2016-12-14 14:01:50 -08:00
parent 40d8d9c3e3
commit aa40366a92
2 changed files with 9 additions and 0 deletions

View File

@ -640,6 +640,9 @@ export class StaticReflector implements ReflectorReader {
return simplifyInContext(selectContext, selectTarget[member], depth + 1);
return null;
case 'reference':
if (!expression['name']) {
return context;
}
if (!expression.module) {
const name: string = expression['name'];
const localValue = scope.resolve(name);