Skip to content

Commit

Permalink
fix: isModalNotification might be undefined (#227)
Browse files Browse the repository at this point in the history
* add optional chaining for possible undefined isModalNotification
  • Loading branch information
PdoubleU committed Nov 15, 2023
1 parent 6183939 commit 86b7a98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/hooks/useNotificationEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const useNotificationEventHandler = ({

useEffect(() => {
const removeListener = emitter.addListener('add_notification', (config: EmitParam) => {
if (!isModalProvider && config.params.isModalNotification) return
if (!isModalProvider && config.params?.isModalNotification) return

dispatch({ type: 'add', payload: config })
})
Expand Down

0 comments on commit 86b7a98

Please sign in to comment.