Skip to content

Commit e38c347

Browse files
committed
fix: fix 2.7 setup state inspection when not using script setup
1 parent b35da4c commit e38c347

File tree

1 file changed

+3
-3
lines changed
  • packages/app-backend-vue2/src/components

1 file changed

+3
-3
lines changed

packages/app-backend-vue2/src/components/data.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,13 @@ function processState (instance): ComponentState[] {
190190

191191

192192
function processSetupState (instance) {
193-
const state = instance._setupProxy
193+
const state = instance._setupProxy || instance
194194
const raw = instance._setupState
195-
if (!raw || !state) {
195+
if (!raw) {
196196
return []
197197
}
198198

199-
return Object.keys(state)
199+
return Object.keys(raw)
200200
.filter(key => !key.startsWith('__'))
201201
.map(key => {
202202
const value = returnError(() => toRaw(state[key]))

0 commit comments

Comments
 (0)