fix(core): don’t stop change detection because of errors
- prevents unsubscribing from the zone on error - prevents unsubscribing from directive `EventEmitter`s on error - prevents detaching views in dev mode if there on error - ensures that `ngOnInit` is only called 1x (also in prod mode) Fixes #9531 Fixes #2413 Fixes #15925
This commit is contained in:

committed by
Matias Niemelä

parent
ac220fc2bb
commit
e263e19a2a
@ -560,6 +560,9 @@ export class ApplicationRef_ extends ApplicationRef {
|
||||
if (this._enforceNoNewChanges) {
|
||||
this._views.forEach((view) => view.checkNoChanges());
|
||||
}
|
||||
} catch (e) {
|
||||
// Attention: Don't rethrow as it could cancel subscriptions to Observables!
|
||||
this._exceptionHandler.handleError(e);
|
||||
} finally {
|
||||
this._runningTick = false;
|
||||
wtfLeave(scope);
|
||||
|
Reference in New Issue
Block a user