fix(animations): properly recover and cleanup DOM when CD failures occur (#20719)

Closes #19093

PR Close #20719
This commit is contained in:
Matias Niemelä
2017-11-30 11:52:35 -08:00
committed by Jason Aden
parent 661fdcd3e2
commit 46aa0a1cf6
2 changed files with 52 additions and 3 deletions

View File

@ -255,9 +255,12 @@ export class ViewRef_ implements EmbeddedViewRef<any>, InternalViewRef {
if (fs.begin) {
fs.begin();
}
Services.checkAndUpdateView(this._view);
if (fs.end) {
fs.end();
try {
Services.checkAndUpdateView(this._view);
} finally {
if (fs.end) {
fs.end();
}
}
}
checkNoChanges(): void { Services.checkNoChangesView(this._view); }