diff --git a/packages/taro-runtime/src/dsl/common.ts b/packages/taro-runtime/src/dsl/common.ts index 008eb4ff0696..a61a41732638 100644 --- a/packages/taro-runtime/src/dsl/common.ts +++ b/packages/taro-runtime/src/dsl/common.ts @@ -98,7 +98,7 @@ export function createPageConfig (component: any, pageName?: string, data?: Reco let loadResolver: (...args: unknown[]) => void let hasLoaded: Promise const config: PageInstance = { - onLoad (this: MpInstance, options, cb?: Func) { + onLoad (this: MpInstance, options = {}, cb?: Func) { hasLoaded = new Promise(resolve => { loadResolver = resolve }) perf.start(PAGE_INIT)