fix(change_detection): convert interpolated null values to empty strings

Fixes #3007

Closes #3271
This commit is contained in:
Pawel Kozlowski
2015-07-24 16:29:50 +02:00
parent 16493e9769
commit 345fa521dd
4 changed files with 25 additions and 1 deletions

View File

@ -371,7 +371,7 @@ export class ChangeDetectorJITGenerator {
for (var i = 0; i < r.args.length; ++i) {
res += JSON.stringify(r.fixedArgs[i]);
res += " + ";
res += this._localNames[r.args[i]];
res += `${UTIL}.s(${this._localNames[r.args[i]]})`;
res += " + ";
}
res += JSON.stringify(r.fixedArgs[r.args.length]);

View File

@ -151,4 +151,6 @@ export class ChangeDetectionUtil {
}
static isValueBlank(value: any): boolean { return isBlank(value); }
static s(value: any): string { return isPresent(value) ? `${value}` : ''; }
}