fix: don't call onAllChangesDone on checkNoChanges
This commit is contained in:
parent
7643d979c7
commit
a664f5a6de
|
@ -46,7 +46,7 @@ export class AbstractChangeDetector extends ChangeDetector {
|
||||||
|
|
||||||
this._detectChangesInLightDomChildren(throwOnChange);
|
this._detectChangesInLightDomChildren(throwOnChange);
|
||||||
|
|
||||||
this.callOnAllChangesDone();
|
if (throwOnChange === false) this.callOnAllChangesDone();
|
||||||
|
|
||||||
this._detectChangesInShadowDomChildren(throwOnChange);
|
this._detectChangesInShadowDomChildren(throwOnChange);
|
||||||
|
|
||||||
|
|
|
@ -339,6 +339,22 @@ export function main() {
|
||||||
|
|
||||||
expect(directive1.onChangesDoneCalled).toBe(true);
|
expect(directive1.onChangesDoneCalled).toBe(true);
|
||||||
expect(directive2.onChangesDoneCalled).toBe(true);
|
expect(directive2.onChangesDoneCalled).toBe(true);
|
||||||
|
|
||||||
|
// reset directives
|
||||||
|
directive1.onChangesDoneCalled = false;
|
||||||
|
directive2.onChangesDoneCalled = false;
|
||||||
|
|
||||||
|
// Verify that checking should not call them.
|
||||||
|
cd.checkNoChanges();
|
||||||
|
|
||||||
|
expect(directive1.onChangesDoneCalled).toBe(false);
|
||||||
|
expect(directive2.onChangesDoneCalled).toBe(false);
|
||||||
|
|
||||||
|
// re-verify that changes are still detected
|
||||||
|
cd.detectChanges();
|
||||||
|
|
||||||
|
expect(directive1.onChangesDoneCalled).toBe(true);
|
||||||
|
expect(directive2.onChangesDoneCalled).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue