diff --git a/src/layouts/vehicle-lookup/vin-lookup-methods/vin-lookup-methods.vue b/src/layouts/vehicle-lookup/vin-lookup-methods/vin-lookup-methods.vue index 633dc865..332ba2d7 100644 --- a/src/layouts/vehicle-lookup/vin-lookup-methods/vin-lookup-methods.vue +++ b/src/layouts/vehicle-lookup/vin-lookup-methods/vin-lookup-methods.vue @@ -59,10 +59,14 @@ export default { const isVinbyAddressPermissible = await this.getIsVinbyAddressPermissible(); this.questionTextFromCms = this.getCmsContent(this.cmsWidgetName, 'QuestionText'); + console.log(JSON.parse) + const answers = this.getCmsContent(this.cmsWidgetName, 'Answers'); + console.log(JSON.parse(JSON.stringify(answers))); if (Array.isArray(answers)) { if (!isVinbyAddressPermissible) { - answers.splice(answers.indexOf(vinLookupMethodSelections.HOMEADDRESS), 1); + const homeAddressIndex = answers.findIndex(answer => answer.Name === vinLookupMethodSelections.HOMEADDRESS); + answers.splice(homeAddressIndex, 1); } this.answersFromCms = answers; }