Skip to content

Commit 66c9c14

Browse files
committed
fix(vue-query-devtools): only register cleanup after mount
1 parent 125067c commit 66c9c14

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

packages/vue-query-devtools/src/devtools.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ watchEffect(() => {
3333
3434
onMounted(() => {
3535
devtools.mount(div.value as HTMLElement)
36-
})
37-
38-
onScopeDispose(() => {
39-
devtools.unmount()
36+
onScopeDispose(() => {
37+
devtools.unmount()
38+
})
4039
})
4140
</script>
4241

packages/vue-query-devtools/src/devtoolsPanel.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ watchEffect(() => {
3838
3939
onMounted(() => {
4040
devtools.mount(div.value as HTMLElement)
41-
})
42-
43-
onScopeDispose(() => {
44-
devtools.unmount()
41+
onScopeDispose(() => {
42+
devtools.unmount()
43+
})
4544
})
4645
</script>
4746

0 commit comments

Comments
 (0)