Skip to content

Commit 115181f

Browse files
marklundinCopilot
andauthored
Update packages/lib/src/hooks/use-app-event.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 161a0f6 commit 115181f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/lib/src/hooks/use-app-event.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ export function useAppEvent<
8585
// update event always receives delta time as first argument
8686
(callback as (dt: number) => void)(args[0] as number);
8787
} else {
88-
// All other events receive no arguments
89-
(callback as () => void)();
88+
// For custom events, forward all arguments to the callback
89+
(callback as any)(...args);
9090
}
9191
}, [callback, event]);
9292

0 commit comments

Comments
 (0)