diff --git a/src/store/index.js b/src/store/index.js index b973ca25..675618a2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -685,7 +685,7 @@ export const useMainStore = defineStore({ safelitePolicy: { policies: [] }, - actualDeductible: this.currentDeductible.toString() ?? '', + actualDeductible: this.currentDeductible?.toString() ?? '', currentRepairDeductible: this.order.currentDeductible.repair, currentReplaceDeductible: this.order.currentDeductible.replace, company: this.order.customer.companyCode diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 6c4ca152..a87a4917 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -2026,7 +2026,7 @@ describe('Store', () => { globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve(response)); // Act - awaitstore.getFinalDeductible(); + await store.getFinalDeductible(); // Assert expect(globalMethods.callHttpClient).toHaveBeenCalledWith(({