Skip to content

Commit 8b1a1c3

Browse files
authored
fix: stop the timerbar when timer paused (#2410)
1 parent ca2c527 commit 8b1a1c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/client/composables/useTimer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export function useTimer() {
1616
interval.counter.value
1717
if (state.value.status === 'stopped' || !state.value.startedAt)
1818
return 0
19+
if (state.value.status === 'paused')
20+
return state.value.pausedAt - state.value.startedAt
1921
return Date.now() - state.value.startedAt
2022
})
2123
const passed = computed(() => passedMs.value / 1000)

0 commit comments

Comments
 (0)