Skip to content

Commit

Permalink
item listing
Browse files Browse the repository at this point in the history
  • Loading branch information
adarsht0001 committed Jul 26, 2023
1 parent e3abaf3 commit 3de90c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
let wishItem = await wishlistHelper.getwishlist(req.session.user._id);
Topproducts.forEach((element) => {
wishItem.forEach((item) => {
if (element.products._id.equals(item.products._id)) {
if (element?.products?._id.equals(item.products._id)) {
element.wishlist = true;
}
});
Expand Down

0 comments on commit 3de90c5

Please sign in to comment.