Skip to content

Commit

Permalink
release: release v2.0.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
runkids committed Jan 6, 2023
1 parent 20e48dd commit 1c03254
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 2 additions & 7 deletions core/use-condition-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ export default function useConditionWatcher<Cond extends Record<string, any>, Re
.finally(() => {
isFetching.value = false
finallyEvent.trigger()
// - Start polling with out setting to manual
if (watcherConfig.manual) return
polling()
})
})
}
Expand All @@ -205,12 +202,10 @@ export default function useConditionWatcher<Cond extends Record<string, any>, Re
}
}

function polling() {
if (pollingTimer.value) return

// - Start polling with out setting to manual
if (!watcherConfig.manual) {
watchEffect((onCleanup) => {
const pollingInterval = unref(watcherConfig.pollingInterval)

if (pollingInterval) {
pollingTimer.value = (() => {
let timerId = null
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-condition-watcher",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Vue composition API for automatic data fetching. With conditions as the core. Easily control and sync to URL query string by conditions",
"main": "./core/dist/index.js",
"module": "./core/dist/index.esm.js",
Expand Down Expand Up @@ -40,7 +40,7 @@
"test:2": "vue-demi-switch 2 vue2 && vitest run",
"test:3": "vue-demi-switch 3 && vitest run",
"test:all": "pnpm format && pnpm build && pnpm test:3 && pnpm test:2 && vue-demi-switch 3",
"prepublishOnly": "pnpm clean && pnpm build",
"prepublishOnly": "pnpm format && pnpm clean && pnpm build",
"publish-beta": "pnpm publish --tag beta"
},
"repository": {
Expand Down Expand Up @@ -97,7 +97,7 @@
"typescript": "^4.6.4",
"vite": "^3.0.0",
"vitest": "^0.18.0",
"vue": "^3.2.37",
"vue": "^3.2.45",
"vue-condition-watcher": "workspace:*",
"vue2": "npm:vue@2.6.14"
},
Expand Down

0 comments on commit 1c03254

Please sign in to comment.