Skip to content

Commit

Permalink
(fix) guard clause in case priorities is null (#1208)
Browse files Browse the repository at this point in the history
  • Loading branch information
PiusKariuki authored Jul 24, 2024
1 parent f5d0aec commit 2de75c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export const QueueEntryActionModal: React.FC<QueueEntryActionModalProps> = ({
return startAtDate > now;
}, [formState.transitionDate, formState.transitionTime, formState.transitionTimeFormat]);

const selectedPriorityIndex = priorities.findIndex((p) => p.uuid == formState.selectedPriority);
const selectedPriorityIndex = priorities?.findIndex((p) => p.uuid == formState.selectedPriority);

return (
<>
Expand Down

0 comments on commit 2de75c3

Please sign in to comment.