Skip to content

Commit

Permalink
Bugfix: product added to wish list are not added if the customer need…
Browse files Browse the repository at this point in the history
…s to log in (#180)

* Fix bug when in the PII account shopperId was an email address

* Update CHANGELOG.md

---------

Co-authored-by: Edwin Obando <[email protected]>
  • Loading branch information
efremov-av and Mecrano authored Sep 17, 2024
1 parent 60ead78 commit ac420e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fix

- shopperId was email even if account is PII

## [1.18.2] - 2024-08-14

### Fix
Expand Down
2 changes: 1 addition & 1 deletion react/AddProductBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const AddBtn: FC<AddBtnProps> = ({ toastURL = '/account/#wishlist' }) => {
return item.listIds[pos]
}

if (isAuthenticated && product && !called && !!shopperId) {
if (isAuthenticated && product && !called && !!shopperId && !!profileData && !!sessionResponse) {

Check failure on line 255 in react/AddProductBtn.tsx

View workflow job for this annotation

GitHub Actions / QE / Lint Node.js

Replace `isAuthenticated·&&·product·&&·!called·&&·!!shopperId·&&·!!profileData·&&·!!sessionResponse)·{·` with `⏎····isAuthenticated·&&⏎····product·&&⏎····!called·&&⏎····!!shopperId·&&⏎····!!profileData·&&⏎····!!sessionResponse⏎··)·{`
if (isAuthenticated && addAfterLogin && addAfterLogin === productId) {
addProduct({
variables: {
Expand Down

0 comments on commit ac420e2

Please sign in to comment.