Skip to content

Commit eaa2cb1

Browse files
authored
fix trying to access undefined product (#1557)
1 parent f01a363 commit eaa2cb1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vtex/loaders/product/extend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const kitItemsExt = async (
6565
const productsById = new Map<string, ProductLeaf>();
6666
for (const batch of batched) {
6767
for (const product of batch || []) {
68-
for (const leaf of product.isVariantOf?.hasVariant || []) {
68+
for (const leaf of product?.isVariantOf?.hasVariant || []) {
6969
productsById.set(leaf.productID, leaf);
7070
}
7171
}

0 commit comments

Comments
 (0)