From d986afa5f68775622af148cb3cec3ca110cdf73d Mon Sep 17 00:00:00 2001 From: Dylan Depass Date: Tue, 5 Nov 2024 13:27:41 -0500 Subject: [PATCH] fix: fix variants check --- src/templates/json/JSONTemplate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/json/JSONTemplate.js b/src/templates/json/JSONTemplate.js index 8518e36..3c4926f 100644 --- a/src/templates/json/JSONTemplate.js +++ b/src/templates/json/JSONTemplate.js @@ -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: [