Skip to content

Commit a79e23f

Browse files
fix: revert getting pinia state on update (#264)
1 parent 26b74b7 commit a79e23f

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

packages/client/src/pages/pinia.vue

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ const getInspectorState = defineDevToolsAction('devtools:inspector-state', (devt
2323
return devtools.api.getInspectorState(payload)
2424
})
2525
26-
const onComponentUpdated = defineDevToolsListener((devtools, callback) => {
27-
devtools.api.on.componentUpdated(() => {
28-
callback()
29-
})
30-
})
31-
3226
const onInspectorTreeUpdated = defineDevToolsListener<string>((devtools, callback) => {
3327
devtools.api.on.sendInspectorTree((payload) => {
3428
callback(payload)
@@ -59,19 +53,13 @@ watch(selected, () => {
5953
createCollapseContext('inspector-state')
6054
6155
onDevToolsClientConnected(() => {
62-
const getPiniaInspectorTree = () => {
63-
getInspectorTree({ inspectorId, filter: '' }).then((_data) => {
64-
const data = parse(_data)
65-
tree.value = data
66-
if (!selected.value && data.length)
67-
selected.value = data[0].id
56+
getInspectorTree({ inspectorId, filter: '' }).then((_data) => {
57+
const data = parse(_data)
58+
tree.value = data
59+
if (!selected.value && data.length) {
60+
selected.value = data[0].id
6861
getPiniaState(data[0].id)
69-
})
70-
}
71-
getPiniaInspectorTree()
72-
73-
onComponentUpdated(() => {
74-
getPiniaInspectorTree()
62+
}
7563
})
7664
7765
onInspectorTreeUpdated((_data) => {

0 commit comments

Comments
 (0)