Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions apps/web/src/constants/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,12 @@ export function bindAction<A extends Action>(
action: A,
handler: ActionFunc<A>
) {
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();
}

Expand Down