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
|
||||
if (this.modelValue !== undefined) {
|
||||
this.selectedTint = this.modelValue.color;
|
||||
for (const tintPart of this.partsForSelectedTint) {
|
||||
for (const glassPart of useMainStore().order.lineItems.glassParts) {
|
||||
if (tintPart.partNumber === glassPart.partNumber) {
|
||||
this.$nextTick(() => {
|
||||
this.updateSelectedPartNumber(tintPart.partNumber);
|
||||
});
|
||||
return;
|
||||
const { glassParts } = useMainStore().order.lineItems;
|
||||
if (glassParts) {
|
||||
for (const tintPart of this.partsForSelectedTint) {
|
||||
for (const glassPart of glassParts) {
|
||||
if (tintPart.partNumber === glassPart.partNumber) {
|
||||
this.$nextTick(() => {
|
||||
this.updateSelectedPartNumber(tintPart.partNumber);
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue