Skip to content

Commit

Permalink
Merge pull request #79 from CarlFMateus/fix/view-in-error
Browse files Browse the repository at this point in the history
User has a favored product and this product is not available. Error
  • Loading branch information
wender authored Aug 31, 2021
2 parents 784563c + 009ac5f commit 76884bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]


### Fix
- Add view empty when user has only one product and this product has no inventory

## [1.8.3] - 2021-08-31


## [1.8.2] - 2021-08-18

## [1.8.1] - 2021-08-18
Expand Down
7 changes: 7 additions & 0 deletions react/ProductSummaryWishlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ const ProductSummaryList: FC<ProductSummaryProps> = ({
}

if (!dataLists || !data || error) {
if (error && error?.message?.includes('products') && showViewEmptyList) {
return (
<ExtensionPoint
id="wishlist-empty-list"
/>
)
}
return null
}

Expand Down

0 comments on commit 76884bc

Please sign in to comment.