diff --git a/packages/marko-web-identity-x/config.js b/packages/marko-web-identity-x/config.js index fb07cd8ee..dad3ade80 100644 --- a/packages/marko-web-identity-x/config.js +++ b/packages/marko-web-identity-x/config.js @@ -29,7 +29,7 @@ class IdentityXConfiguration { hiddenFields = ['city', 'street', 'addressExtra', 'phoneNumber'], defaultCountryCode, booleanQuestionsLabel, - gtmUserFields = {}, // { primary_role: 'ObjectId' } + gtmUserFields = {}, onHookError, ...rest } = {}) { @@ -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 }) => id === value) - if (select && select.answers.length) userData[key] = select.answers.map(({ label }) => label).join("|"); - const boolean = user.customBooleanFieldAnswers.find(({ id }) => id === 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 }) => id === value); if (boolean && boolean.hasAnswered) userData[key] = boolean.answer; }); return userData;