Utilities: Fix "no-unnecessary-condition" issue
This commit is contained in:
parent
607f2ee3c7
commit
199dd3d5d7
1 changed files with 1 additions and 1 deletions
|
|
@ -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 () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue