Skip to content

Commit

Permalink
fix(dashboard): update local sentAt when sending campaign
Browse files Browse the repository at this point in the history
When sending a campaign for the first time, the `sentAt` field for the
in-memory representation of `Campaign` is still undefined. This causes
"invalid_Date" to appear in the filename of delivery reports.

Fix this by updating the `sentAt` field of the in-memory `Campaign` to
the current date when sending the campaign for the first time.

Fixes issue #1113
  • Loading branch information
zwliew committed Apr 6, 2021
1 parent bcc078b commit 2abf7b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/create/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export const confirmSendCampaign = async ({
if (sendRate) {
sendUserEvent(GA_USER_EVENTS.USE_SEND_RATE, channelType)
}
updateCampaign({ status: Status.Sending })
updateCampaign({ status: Status.Sending, sentAt: new Date().toISOString() })
}

0 comments on commit 2abf7b3

Please sign in to comment.