Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #550 from hotwax/#549/error-cannot-read-property-i…
Browse files Browse the repository at this point in the history
…d-of-undefined

Improved: the code to fix the error of undefined on the product page (#549)
  • Loading branch information
Fifciu authored Jan 7, 2021
2 parents 1f32590 + a7fb3b4 commit 4b1903b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/molecules/m-product-gallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default {
selectThis = false
}
}
return selectThis || (image.id && image.id.color && String(image.id.color) === String(this.configuration.color.id))
return this.configuration.color ? selectThis || (image.id && image.id.color && String(image.id.color) === String(this.configuration.color.id)) : false
})
if (!variantImage) {
Expand Down

0 comments on commit 4b1903b

Please sign in to comment.