Skip to content

Commit c6469d5

Browse files
authored
fix(useIdle): changed the reset call when the initial value is true (#4800)
1 parent 573707f commit c6469d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/useIdle/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export function useIdle(
8888
}, listenerOptions)
8989
}
9090

91-
reset()
91+
if (!initialState)
92+
reset()
9293
}
9394

9495
return {

0 commit comments

Comments
 (0)