CASH-2025: Add null check

This commit is contained in:
Chris Redelinghuys 2026-01-12 09:10:20 -05:00
parent 2f6a3aa844
commit f1c4e291c3

View file

@ -939,9 +939,12 @@ export default {
const windshieldString = "WINDSHIELD";
this.lineItems.glassParts.forEach((part, index) => {
if (part.partType === windshieldString) {
this.lineItems.glassParts[index] = this.alternateGlassPartsForOem.find(
let altPartToUse = this.alternateGlassPartsForOem.find(
(altPart) => altPart.partType === windshieldString
);
if (altPartToUse) {
this.lineItems.glassParts[index] = altPartToUse;
}
}
});
},