Skip to content

Commit

Permalink
fix(frontend): fix issue when getValues returns undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
g-tejas committed May 28, 2024
1 parent b158d76 commit 9237db1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const AdminEmailRecipientsInput = ({
// Get rid of bad tags before submitting.
setValue(
'emails',
getValues('emails').filter((email) => tagValidation(email)),
(getValues('emails') || []).filter((email) => tagValidation(email)),
)
handleSubmit(onSubmit)()
}, [getValues, handleSubmit, onSubmit, setValue, tagValidation])
Expand Down

0 comments on commit 9237db1

Please sign in to comment.