SSR-1290 Null check glass parts
This commit is contained in:
parent
24ca91d30a
commit
687f63e82f
1 changed files with 10 additions and 7 deletions
|
|
@ -204,13 +204,16 @@ export default {
|
||||||
// Populate button-question model-value if parts data already exists in store
|
// Populate button-question model-value if parts data already exists in store
|
||||||
if (this.modelValue !== undefined) {
|
if (this.modelValue !== undefined) {
|
||||||
this.selectedTint = this.modelValue.color;
|
this.selectedTint = this.modelValue.color;
|
||||||
for (const tintPart of this.partsForSelectedTint) {
|
const { glassParts } = useMainStore().order.lineItems;
|
||||||
for (const glassPart of useMainStore().order.lineItems.glassParts) {
|
if (glassParts) {
|
||||||
if (tintPart.partNumber === glassPart.partNumber) {
|
for (const tintPart of this.partsForSelectedTint) {
|
||||||
this.$nextTick(() => {
|
for (const glassPart of glassParts) {
|
||||||
this.updateSelectedPartNumber(tintPart.partNumber);
|
if (tintPart.partNumber === glassPart.partNumber) {
|
||||||
});
|
this.$nextTick(() => {
|
||||||
return;
|
this.updateSelectedPartNumber(tintPart.partNumber);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue