fix(compiler): emits quoted keys only iff they are quoted in the original template

fixes #14292
This commit is contained in:
Victor Berchet
2017-07-05 14:51:39 -07:00
committed by Jason Aden
parent 798947efa4
commit 9c1f6fd06f
11 changed files with 77 additions and 55 deletions

View File

@ -311,9 +311,8 @@ class StatementInterpreter implements o.StatementVisitor, o.ExpressionVisitor {
return this.visitAllExpressions(ast.entries, ctx);
}
visitLiteralMapExpr(ast: o.LiteralMapExpr, ctx: _ExecutionContext): any {
const result = {};
ast.entries.forEach(
(entry) => (result as any)[entry.key] = entry.value.visitExpression(this, ctx));
const result: {[k: string]: any} = {};
ast.entries.forEach(entry => result[entry.key] = entry.value.visitExpression(this, ctx));
return result;
}
visitCommaExpr(ast: o.CommaExpr, context: any): any {