From 2fca5d2fa5173b3b341794c44e69d90d400ed567 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 29 Jun 2026 11:41:43 -0400 Subject: [PATCH] Copilot updates --- .../vin-lookup-methods/vin-lookup-methods.vue | 4 +++- src/layouts/vin-lookup/vin-lookup.vue | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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 6a17f75c..2ebf89a4 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 @@ -69,7 +69,9 @@ export default { const isVinRequired = useMainStore().order.vehicle.vinRequired; if (isVinRequired) { const vinIndex = answers.findIndex(answer => answer.Name === vinLookupMethodSelections.NOVIN); - answers.splice(vinIndex, 1); + if (vinIndex >= 0) { + answers.splice(vinIndex, 1); + } } this.answersFromCms = answers; diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index b22381f7..57a462bb 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -271,22 +271,20 @@ export default { } if (this.mainStore.order.vehicle.vinRequired) { - const partsOrQuestionsResponse = await this.getPartsOrQuestionsVinRequired() - .then(async (response) => { + try { + const partsOrQuestionsResponse = await this.getPartsOrQuestionsVinRequired(); await this.navigateForward( partsOrQuestionsResponse.data.partsOrQuestions, this ); - return response; - }) - .catch((e) => { + } catch (e) { this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(this.vehicleFromLookup.carId)); this.$router.navigate( this.navigationScenarios.BAILOUT, this.$route ); throw e; - }); + } return; }