From 41315f3f5f6ed27fe66d96c9248cf1b5b1abf93f Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 30 Aug 2025 22:47:07 +0100 Subject: [PATCH] avoid using `as any` assertion where not required --- apps/web/src/constants/actions.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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(); }