Skip to content

Commit

Permalink
fix(shared): ensure invokeArrayFns handles undefined arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-leong committed May 6, 2024
1 parent c0c9432 commit 5cd0973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/src/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 5cd0973

Please sign in to comment.