Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a5fb05c

Browse files
committed
fix(useTimeoutPoll): only start by default at client
1 parent bba3f32 commit a5fb05c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/useTimeoutPoll/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Awaitable, MaybeRefOrGetter, Pausable, UseTimeoutFnOptions } from '@vueuse/shared'
2-
import { tryOnScopeDispose, useTimeoutFn } from '@vueuse/shared'
2+
import { isClient, tryOnScopeDispose, useTimeoutFn } from '@vueuse/shared'
33
import { ref } from 'vue'
44

55
export function useTimeoutPoll(
@@ -34,7 +34,7 @@ export function useTimeoutPoll(
3434
isActive.value = false
3535
}
3636

37-
if (immediate)
37+
if (immediate && isClient)
3838
resume()
3939

4040
tryOnScopeDispose(pause)

0 commit comments

Comments
 (0)