fix(core): detectChanges() doesn't work on detached instance
Closes #13426 Closes #13472
This commit is contained in:

committed by
Victor Berchet

parent
6557bc34f6
commit
4d6ac9d414
@ -312,11 +312,16 @@ export abstract class AppView<T> {
|
||||
*/
|
||||
dirtyParentQueriesInternal(): void {}
|
||||
|
||||
internalDetectChanges(throwOnChange: boolean): void {
|
||||
if (this.cdMode !== ChangeDetectorStatus.Detached) {
|
||||
this.detectChanges(throwOnChange);
|
||||
}
|
||||
}
|
||||
|
||||
detectChanges(throwOnChange: boolean): void {
|
||||
const s = _scope_check(this.clazz);
|
||||
if (this.cdMode === ChangeDetectorStatus.Checked ||
|
||||
this.cdMode === ChangeDetectorStatus.Errored ||
|
||||
this.cdMode === ChangeDetectorStatus.Detached)
|
||||
this.cdMode === ChangeDetectorStatus.Errored)
|
||||
return;
|
||||
if (this.cdMode === ChangeDetectorStatus.Destroyed) {
|
||||
this.throwDestroyedError('detectChanges');
|
||||
|
Reference in New Issue
Block a user