Add nullish check to prevent error when lineItems.glassParts is undefined
This commit is contained in:
parent
f45b7fbde5
commit
4618f1c4f9
2 changed files with 2 additions and 1 deletions
|
|
@ -206,6 +206,7 @@ describe('OrderConfirmation.vue', () => {
|
||||||
useMainStore().getSubmittedOrder = jest.fn().mockImplementation(() => sessionStorage);
|
useMainStore().getSubmittedOrder = jest.fn().mockImplementation(() => sessionStorage);
|
||||||
};
|
};
|
||||||
const { wrapper } = getMountedComponent(initialStore, {}, mockStoreActions);
|
const { wrapper } = getMountedComponent(initialStore, {}, mockStoreActions);
|
||||||
|
console.log(wrapper.vm.$refs);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
const arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
||||||
|
|
|
||||||
|
|
@ -280,7 +280,7 @@ export default {
|
||||||
return content;
|
return content;
|
||||||
},
|
},
|
||||||
serviceTypeText() {
|
serviceTypeText() {
|
||||||
const glassPieces = this.submittedOrder.lineItems.glassParts.map((part) => part.partType.toLowerCase());
|
const glassPieces = this.submittedOrder.lineItems.glassParts?.map((part) => part.partType.toLowerCase()) ?? [];
|
||||||
let glassList = getGlassList(glassPieces);
|
let glassList = getGlassList(glassPieces);
|
||||||
let workType = '';
|
let workType = '';
|
||||||
if (this.isRepair) {
|
if (this.isRepair) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue