Skip to content

Commit 8c632eb

Browse files
committed
fix: add type guard for conditionals property in client
Use 'in' operator to properly narrow ActionConfig type before accessing conditionals property. Some action types (like READ) don't have conditionals, so we need a type guard to satisfy TypeScript's stricter checking.
1 parent 94e4ac0 commit 8c632eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/client/src/v2-events/features/workqueues/EventOverview/components/useAllowedActionConfigurations.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,11 @@ function applyActionConditionalEffects({
640640
'customActionType' in action ? action.customActionType : undefined
641641
})
642642

643-
if (!actionConfig || !actionConfig.conditionals) {
643+
if (
644+
!actionConfig ||
645+
!('conditionals' in actionConfig) ||
646+
!actionConfig.conditionals
647+
) {
644648
return action
645649
}
646650

0 commit comments

Comments
 (0)