Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
clean up use of id & qId
Browse files Browse the repository at this point in the history
  • Loading branch information
B77Mills committed Sep 27, 2023
1 parent e6e46ed commit 084d485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/marko-web-identity-x/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ class IdentityXConfiguration {
const questions = this.getAsObject('gtmUserFields');
const userData = { user_id: user.id };
Object.entries(questions).forEach(([key, value]) => {
const select = user.customSelectFieldAnswers.find(({id: qId}) => qId === value)
const select = user.customSelectFieldAnswers.find(({ id }) => id === value)
if (select && select.answers.length) userData[key] = select.answers.map(({ label }) => label).join("|");
const boolean = user.customBooleanFieldAnswers.find(({id: qId}) => qId === value)
const boolean = user.customBooleanFieldAnswers.find(({ id }) => id === value)
if (boolean && boolean.hasAnswered) userData[key] = boolean.answer;
});
return userData;
Expand Down

0 comments on commit 084d485

Please sign in to comment.