Removed prepended window from setTimeout

This commit is contained in:
Mitchell Heddles 2019-08-23 16:08:04 +10:00 committed by GitHub
parent 3b6b72385a
commit 698399938d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ export default function useTimeoutFn(fn: Function, ms: number = 0): UseTimeoutFn
const isReady = useCallback(() => ready.current, []);
const set = useCallback(() => {
ready.current = false;
timeout.current = window.setTimeout(() => {
timeout.current = setTimeout(() => {
ready.current = true;
fn();
}, ms);