diff --git a/src/component/component.ts b/src/component/component.ts index 34e73de3..1a272efe 100644 --- a/src/component/component.ts +++ b/src/component/component.ts @@ -340,6 +340,7 @@ export class Component { // we were mounted when render was called, but we aren't anymore, so we // were actually about to be unmounted ; we can thus forget about this // fiber + fiber.isCompleted = true; __owl__.currentFiber = null; } }); diff --git a/tests/component/component.test.ts b/tests/component/component.test.ts index b41e015b..a8b100ad 100644 --- a/tests/component/component.test.ts +++ b/tests/component/component.test.ts @@ -5052,6 +5052,8 @@ describe("unmounting and remounting", () => { await nextTick(); // wait for changes to be detected before remounting await widget.mount(fixture); expect(fixture.innerHTML).toBe("
3
"); + // we want to make sure that there are no remaining tasks left at this point. + expect(Component.scheduler.tasks.length).toBe(0); }); test("sub component is still active after being unmounted and remounted", async () => {