From 5cd097373f2e48b90cf6be1e90f2de877fee7514 Mon Sep 17 00:00:00 2001 From: tycho Date: Mon, 6 May 2024 10:39:06 +0800 Subject: [PATCH] fix(shared): ensure invokeArrayFns handles undefined arguments --- packages/shared/src/general.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/src/general.ts b/packages/shared/src/general.ts index fb884695d33..33ca27dd881 100644 --- a/packages/shared/src/general.ts +++ b/packages/shared/src/general.ts @@ -135,7 +135,7 @@ export const hasChanged = (value: any, oldValue: any): boolean => export const invokeArrayFns = (fns: Function[], arg?: any) => { for (let i = 0; i < fns.length; i++) { - fns[i](arg) + arg === undefined ? fns[i]() : fns[i](arg) } }