Skip to content

Commit 6c3c606

Browse files
author
Tim Blasi
committed
fix(core): Fix type error
Ensure that values passed to `DomRenderer#setElementAttribute` are strings. Currently, booleans can be passed to this method, resulting in failures when running in Dart checked mode.
1 parent 46dd5fc commit 6c3c606

File tree

1 file changed

+1
-1
lines changed
  • modules/angular2/src/core/compiler

1 file changed

+1
-1
lines changed

modules/angular2/src/core/compiler/view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class AppView implements ChangeDispatcher, RenderEventDispatcher {
184184
if (b.isElementProperty()) {
185185
this.renderer.setElementProperty(elementRef, b.name, currentValue);
186186
} else if (b.isElementAttribute()) {
187-
this.renderer.setElementAttribute(elementRef, b.name, currentValue);
187+
this.renderer.setElementAttribute(elementRef, b.name, `${currentValue}`);
188188
} else if (b.isElementClass()) {
189189
this.renderer.setElementClass(elementRef, b.name, currentValue);
190190
} else if (b.isElementStyle()) {

0 commit comments

Comments
 (0)