Skip to content

Commit

Permalink
Utilities: Fix "no-unnecessary-condition" issue
Browse files Browse the repository at this point in the history
  • Loading branch information
regexowl authored and lucasgarfield committed Jan 26, 2025
1 parent 607f2ee commit 199dd3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utilities/useDebounce.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function useDebounce<T>(
if (!isEqual(value, debouncedValue)) {
const timer = setTimeout(
() => setDebouncedValue(value),
value === '' ? 0 : delay !== undefined ? delay : 500 //If value is empty string, instantly return
value === '' ? 0 : delay //If value is empty string, instantly return
);

return () => {
Expand Down

0 comments on commit 199dd3d

Please sign in to comment.