diff --git a/src/runtime/sandbox.ts b/src/runtime/sandbox.ts index f86b9ed8..12ac5555 100644 --- a/src/runtime/sandbox.ts +++ b/src/runtime/sandbox.ts @@ -194,11 +194,12 @@ export function jsObtainContext(id: string) { export function jsReleaseContext(id: string) { const context = gContexts.get(id) + const args = arguments if (context) { timerInfos.forEach((v, k) => { if (v.context === context) { if (global.nativeClearTimer === undefined) { - return Reflect.apply(_clearTimeout, undefined, arguments) + return Reflect.apply(_clearTimeout, undefined, args) } timerInfos.delete(k) nativeClearTimer(k) diff --git a/src/ui/view.ts b/src/ui/view.ts index 3ed26ffa..4f70088b 100644 --- a/src/ui/view.ts +++ b/src/ui/view.ts @@ -367,9 +367,11 @@ export abstract class Superview extends View { toModel() { const subviews = [] for (let v of this.allSubviews()) { - v.superview = this - if (v.isDirty()) { - subviews.push(v.toModel()) + if (v != undefined) { + v.superview = this + if (v.isDirty()) { + subviews.push(v.toModel()) + } } } this.dirtyProps.subviews = subviews