Skip to content

Commit

Permalink
fix(useIntervalFn): watch interval correctly (#1676)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Jun 16, 2022
1 parent 3a6b9d5 commit 1674063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/useIntervalFn/index.ts
Expand Up @@ -62,7 +62,7 @@ export function useIntervalFn(cb: Fn, interval: MaybeRef<number> = 1000, options

if (isRef(interval)) {
const stopWatch = watch(interval, () => {
if (immediate && isClient)
if (isActive.value && isClient)
resume()
})
tryOnScopeDispose(stopWatch)
Expand Down

0 comments on commit 1674063

Please sign in to comment.