fix(common): properly take className changes into account (#21937)

Fixes #21932

PR Close #21937
This commit is contained in:
Pawel Kozlowski
2018-01-31 17:57:37 +01:00
committed by Alex Rickabaugh
parent 5c8340aae0
commit 4a426696c9
2 changed files with 12 additions and 1 deletions

View File

@ -126,7 +126,7 @@ export class NgClass implements DoCheck {
(<any>rawClassVal).forEach((klass: string) => this._toggleClass(klass, !isCleanup));
} else {
Object.keys(rawClassVal).forEach(klass => {
if (rawClassVal[klass] != null) this._toggleClass(klass, !isCleanup);
this._toggleClass(klass, isCleanup ? false : !!rawClassVal[klass]);
});
}
}