diff --git a/src/hooks/useInterval.ts b/src/hooks/useInterval.ts index 9c45c91..fbc4231 100644 --- a/src/hooks/useInterval.ts +++ b/src/hooks/useInterval.ts @@ -3,6 +3,7 @@ import { GetterTree } from 'vuex' import { State, RootActions } from '@/store' const MIN_INTERVAL = 0.5 +const MAX_INTERVAL = 60 export const useInterval = () => { const { interval } = useGetters>(['interval']) @@ -15,7 +16,7 @@ export const useInterval = () => { } const plus = () => { - setInterval(Math.floor(interval.value + 1)) + setInterval(Math.min(Math.floor(interval.value + 1), MAX_INTERVAL)) } return {