mohamedsamara / mern-ecommerce

:balloon: Fullstack MERN Ecommerce Application
https://mern-store-gold.vercel.app
MIT License
1.63k stars 770 forks source link

Filter Rating #212

Closed friouimehertesting closed 4 months ago

friouimehertesting commented 11 months ago

Describe the bug I was wondering why ratingFilter returns the same result for both truthy and falsy values in the file utils/queries.js. Can you explain to me please .


  const ratingFilter = rating
    ? { rating: { $gte: rating } }
    : { rating: { $gte: rating } };