Skip to content

Commit 7973a29

Browse files
author
Shaochuan Luo
committed
fix(backends): ensure currentAppRecord is defined when backend handling components events emitted from Vue. (fix vuejs#1770)
1 parent 122207d commit 7973a29

File tree

1 file changed

+5
-5
lines changed
  • packages/app-backend-core/src

1 file changed

+5
-5
lines changed

packages/app-backend-core/src/app.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,16 @@ async function createAppRecord (options: AppRecordOptions, backend: DevtoolsBack
9797
appRecord: mapAppRecord(record),
9898
})
9999

100+
// Auto select first app
101+
if (ctx.currentAppRecord == null) {
102+
await selectApp(record, ctx)
103+
}
104+
100105
if (appRecordPromises.has(options.app)) {
101106
for (const r of appRecordPromises.get(options.app)) {
102107
await r(record)
103108
}
104109
}
105-
106-
// Auto select first app
107-
if (ctx.currentAppRecord == null) {
108-
await selectApp(record, ctx)
109-
}
110110
} else if (SharedData.debugInfo) {
111111
console.warn('[Vue devtools] No root instance found for app, it might have been unmounted', options.app)
112112
}

0 commit comments

Comments
 (0)