diff --git a/index.js b/index.js index f6e4fe2..19abdbf 100644 --- a/index.js +++ b/index.js @@ -1245,7 +1245,7 @@ export function useThrottle(value, interval = 500) { React.useEffect(() => { const now = Date.now(); - if (lastUpdated.current && now >= lastUpdated.current + interval) { + if (!lastupdated.current || now >= lastUpdated.current + interval) { lastUpdated.current = now; setThrottledValue(value); } else {