Utilities: Fix "no-unnecessary-condition" issue

This commit is contained in:
regexowl 2025-01-17 09:49:28 +01:00 committed by Lucas Garfield
parent 607f2ee3c7
commit 199dd3d5d7

View file

@ -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 () => {