Skip to content

Commit

Permalink
return number of fav items, not sum
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorVilas committed May 2, 2023
1 parent f17f743 commit 82870ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/storedData.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const storedData = (() => {
cartCount += storedCart[item];
}

favsCount = storedFavs.length > 0 ? storedFavs.reduce((curr, next) => curr + next) : 0;
favsCount = storedFavs.length;

return {
cartCount,
Expand Down

0 comments on commit 82870ee

Please sign in to comment.