diff --git a/apps/web/src/constants/actions.ts b/apps/web/src/constants/actions.ts index 50e8ae5d7..5c8770fd9 100644 --- a/apps/web/src/constants/actions.ts +++ b/apps/web/src/constants/actions.ts @@ -121,13 +121,12 @@ export function bindAction( action: A, handler: ActionFunc ) { - if (boundActions[action]) { - boundActions[action]?.push(handler); - } else { - // 'any' assertion because TypeScript doesn't seem to be able to figure out the links. - boundActions[action] = [handler] as any; + if (!boundActions[action]) { + boundActions[action] = []; } + boundActions[action].push(handler); + updateActiveActions(); }