Skip to content

Commit

Permalink
handle event for double optin
Browse files Browse the repository at this point in the history
  • Loading branch information
tttp committed Oct 2, 2024
1 parent e9e95e0 commit e8d2101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export const main = async (argv: string[]) => {
}
for (const file of opt._) {
const message = JSON.parse(readFileSync(file, "utf8"));
if(!message.campaign.id) { // update to the newer v2 format
message.campaign.id=message.campaignId;
if(message.campaign && !message.campaign.id) { // update to the newer v2 format
message.campaign.id=message.campaignId;
message.action.id=message.actionId;
message.org.id=message.orgId;
message.actionPage.id=message.actionPageId;
Expand Down

0 comments on commit e8d2101

Please sign in to comment.