diff --git a/packages/runtime-core/src/compat/global.ts b/packages/runtime-core/src/compat/global.ts index f64e7adf210..fa88d5f2709 100644 --- a/packages/runtime-core/src/compat/global.ts +++ b/packages/runtime-core/src/compat/global.ts @@ -622,11 +622,9 @@ function defineReactive(obj: any, key: string, val: any) { if (isObject(val) && !isReactive(val) && !patched.has(val)) { const reactiveVal = reactive(val) if (isArray(val)) { - methodsToPatch.forEach(m => { - // @ts-expect-error + methodsToPatch.forEach((m: any) => { val[m] = (...args: any[]) => { - // @ts-expect-error - Array.prototype[m].call(reactiveVal, ...args) + Array.prototype[m].apply(reactiveVal, args) } }) } else { diff --git a/packages/runtime-core/src/compat/instanceEventEmitter.ts b/packages/runtime-core/src/compat/instanceEventEmitter.ts index a8d3f52518b..7f0ebf8bbe9 100644 --- a/packages/runtime-core/src/compat/instanceEventEmitter.ts +++ b/packages/runtime-core/src/compat/instanceEventEmitter.ts @@ -52,7 +52,7 @@ export function once( ) { const wrapped = (...args: any[]) => { off(instance, event, wrapped) - fn.call(instance.proxy, ...args) + fn.apply(instance.proxy, args) } wrapped.fn = fn on(instance, event, wrapped)