diff --git a/runtime/main/page/api/Differ.ts b/runtime/main/page/api/Differ.ts index 1726b6130657b56c60f4c364e9c05710040e963a..c40314ab3a454686eeb1b9b0724ca7f9b8c0e076 100644 --- a/runtime/main/page/api/Differ.ts +++ b/runtime/main/page/api/Differ.ts @@ -63,10 +63,13 @@ export default class Differ { this._hasTimer = true; // Use setTimeout instead of setTimeoutDiffer - setTimeout(() => { - this._hasTimer = false; - this.flush(); - }, 0); + // avoid invoking setTimeout after appDestroy + if (typeof setTimeout === "function") { + setTimeout(() => { + this._hasTimer = false; + this.flush(); + }, 0); + } } const map: object[] = this._map; if (!map[defaultDepth]) {