From 22ae2d09760ba05a5647232a7b2463b82a59f160 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Tue, 12 Apr 2016 12:03:38 -0700 Subject: [PATCH] cleanup(html_parser): cleanup to fix analyzer warnings --- modules/angular2/src/compiler/html_parser.ts | 2 +- modules/angular2/src/compiler/legacy_template.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/angular2/src/compiler/html_parser.ts b/modules/angular2/src/compiler/html_parser.ts index 56b522f559..0bd124cbe4 100644 --- a/modules/angular2/src/compiler/html_parser.ts +++ b/modules/angular2/src/compiler/html_parser.ts @@ -150,7 +150,7 @@ class TreeBuilder { // parse everything in between { and } let parsedExp = new TreeBuilder(exp).build(); if (parsedExp.errors.length > 0) { - this.errors = this.errors.concat(parsedExp.errors); + this.errors = this.errors.concat(parsedExp.errors); return; } diff --git a/modules/angular2/src/compiler/legacy_template.ts b/modules/angular2/src/compiler/legacy_template.ts index d26b9e8ac1..3a58f7c7a1 100644 --- a/modules/angular2/src/compiler/legacy_template.ts +++ b/modules/angular2/src/compiler/legacy_template.ts @@ -88,7 +88,8 @@ export class LegacyHtmlAstTransformer implements HtmlAstVisitor { visitExpansion(ast: HtmlExpansionAst, context: any): any { let cases = ast.cases.map(c => c.visit(this, null)); - return new HtmlExpansionAst(ast.switchValue, ast.type, cases, ast.sourceSpan); + return new HtmlExpansionAst(ast.switchValue, ast.type, cases, ast.sourceSpan, + ast.switchValueSourceSpan); } visitExpansionCase(ast: HtmlExpansionCaseAst, context: any): any { return ast; }