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);
|
||||
};
|
||||
const { wrapper } = getMountedComponent(initialStore, {}, mockStoreActions);
|
||||
console.log(wrapper.vm.$refs);
|
||||
|
||||
// Act
|
||||
const arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ export default {
|
|||
return content;
|
||||
},
|
||||
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 workType = '';
|
||||
if (this.isRepair) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue