Skip to content

Commit

Permalink
fix emailReplyTo and submissionRecipient behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanmcgowan committed Dec 31, 2023
1 parent 4d5f42c commit 736d776
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-chefs-hear.md
@@ -0,0 +1,5 @@
---
"submitjson": patch
---

fix emailReplyTo and submissionRecipient behavior
4 changes: 2 additions & 2 deletions index.ts
Expand Up @@ -94,8 +94,8 @@ export default class SubmitJSON {
// check to make sure the options are valid
if (o) {
// deletes any undefined keys
const { emailNotification, submissionFormat, submissionSound } = o
const options: RequestOptions = { emailNotification, submissionFormat, submissionSound }
const { emailNotification, submissionFormat, submissionSound, emailReplyTo, submissionRecipient } = o
const options: RequestOptions = { emailNotification, submissionFormat, submissionSound, emailReplyTo, submissionRecipient }
Object.keys(options).forEach(key => options && options[key as keyof SubmitOptions] === undefined && delete options[key as keyof SubmitOptions])

if (Object.keys(options).length > 0)
Expand Down

0 comments on commit 736d776

Please sign in to comment.