Skip to content

Commit

Permalink
Update Filters.jsx
Browse files Browse the repository at this point in the history
modified code to avoid boundary errors
  • Loading branch information
techy4shri authored Aug 7, 2024
1 parent d1ec47e commit b78d1ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/User/components/Popular_Categories/Filters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function Filters({
options={["1", "2", "3", "4", "5"]}
onChange={(e) => {
const value = parseInt(e.target.value, 10); //converting into int from decimal
setRatingFilter(isNaN(value) ? 0.00 : value); //applying condition for rating or higher
setRatingFilter(Number.isNaN(value) ? 0.00 : value); //applying condition for rating or higher
}
}
/>
Expand Down

0 comments on commit b78d1ad

Please sign in to comment.