Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
fix: prevent crash when accessing undefined selected option (#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmazzola authored Dec 3, 2019
1 parent e09d461 commit 0ffdbf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/modals/ConditionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ const Component: React.FC<Props> = (props) => {
}

const isOperatorDisabled = selectedEntityOption?.data.entityType === CLM.EntityType.ENUM
const conditionsUsingEntity = props.conditions.filter(c => c.entityId === selectedEntityOption.key)
const conditionsUsingEntity = props.conditions.filter(c => c.entityId === selectedEntityOption?.key)
const currentCondition = createConditionFromState()

return <OF.Modal
Expand Down

0 comments on commit 0ffdbf5

Please sign in to comment.