Skip to content

Commit

Permalink
fix: prevent onCancel crash #827
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdevkar authored May 28, 2024
1 parent ff07409 commit a9b6f92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const useModal = ({ props, id }) => {

const onCancel = useCallback(
(params) => {
if (params.id !== id) return
if (params?.id !== id) return
closing.current = true
if (props.onCancel) props.onCancel()
},
Expand Down

0 comments on commit a9b6f92

Please sign in to comment.