Merge pull request #1088 from Safelite/feature/humphries/address-not-permissible-fix

Fix to properly remove the home address option from the vehicle lookup
This commit is contained in:
AHumphriesSL 2026-02-16 15:19:54 -05:00 committed by GitHub
commit 9bc40980d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,8 @@ export default {
const answers = this.getCmsContent(this.cmsWidgetName, '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;
}