Skip to content

Commit 5cd0973

Browse files
committed
fix(shared): ensure invokeArrayFns handles undefined arguments
1 parent c0c9432 commit 5cd0973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/src/general.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export const hasChanged = (value: any, oldValue: any): boolean =>
135135

136136
export const invokeArrayFns = (fns: Function[], arg?: any) => {
137137
for (let i = 0; i < fns.length; i++) {
138-
fns[i](arg)
138+
arg === undefined ? fns[i]() : fns[i](arg)
139139
}
140140
}
141141

0 commit comments

Comments
 (0)