Skip to content

Commit 2e8ddc3

Browse files
pedro-gbfboliveira
authored andcommitted
fix: referencedListing serverInitialState Validation
1 parent 6ac3a3f commit 2e8ddc3

File tree

1 file changed

+2
-1
lines changed
  • packages/redux/src/products/serverInitialState

1 file changed

+2
-1
lines changed

packages/redux/src/products/serverInitialState/listings.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ const serverInitialState: ProductListingsServerInitialState = ({
3737
const hash = generateProductListingHash(builtSlug, query, {
3838
isSet,
3939
});
40+
const referencedListing = get(model, 'relatedCommerceData.referencedListing');
4041

41-
if (get(model, 'relatedCommerceData.referencedListing')) {
42+
if (referencedListing && referencedListing.length) {
4243
const {
4344
breadCrumbs,
4445
config,

0 commit comments

Comments
 (0)