Skip to content

Commit

Permalink
fix: fix variants check
Browse files Browse the repository at this point in the history
  • Loading branch information
dylandepass committed Nov 5, 2024
1 parent f91bbae commit d986afa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/templates/json/JSONTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class JSONTemplate {
renderOffers() {
const image = this.product.images?.[0]?.url
?? findProductImage(this.product, this.variants)?.url;
const configurableProduct = this.variants && this.variants.length > 0;
const configurableProduct = this.variants?.length > 0;
const offers = configurableProduct ? this.variants : [this.product];
return {
offers: [
Expand Down

0 comments on commit d986afa

Please sign in to comment.