fix(common): A null value should remove the style on IE (#21679)
fixes #21064 PR Close #21679
This commit is contained in:

committed by
Miško Hevery

parent
86d9612230
commit
7d49443060
@ -65,6 +65,10 @@ export class NgStyle implements DoCheck {
|
||||
const [name, unit] = nameAndUnit.split('.');
|
||||
value = value != null && unit ? `${value}${unit}` : value;
|
||||
|
||||
this._renderer.setStyle(this._ngEl.nativeElement, name, value as string);
|
||||
if (value != null) {
|
||||
this._renderer.setStyle(this._ngEl.nativeElement, name, value as string);
|
||||
} else {
|
||||
this._renderer.removeStyle(this._ngEl.nativeElement, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user