Skip to content

Commit

Permalink
fix: use name if custom screen name is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishmalik committed Nov 13, 2023
1 parent 8d0219f commit 4ff110f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/v0/destinations/am/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ const processSingleMessage = (message, destination) => {
.trim();
customScreenEv =
userProvidedScreenEventString.trim() === ''
? eventType
? name
: userProvidedScreenEventString
.trim()
.replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath));
Expand Down
2 changes: 1 addition & 1 deletion test/__tests__/data/am_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -4449,7 +4449,7 @@
"prop1": "5",
"name": "Screen"
},
"event_type": "Viewed Screen Screen",
"event_type": "Screen",
"time": 1580602989544,
"user_id": "identified user id",
"user_properties": {},
Expand Down

0 comments on commit 4ff110f

Please sign in to comment.