Skip to content

Commit

Permalink
perf: skip waiting for app record on hidden apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 26, 2022
1 parent 668f11b commit 37aa0a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/app-backend-core/src/app.ts
Expand Up @@ -54,6 +54,7 @@ async function createAppRecord (options: AppRecordOptions, backend: DevtoolsBack
const rootInstance = await backend.api.getAppRootInstance(options.app)
if (rootInstance) {
if ((await backend.api.getComponentDevtoolsOptions(rootInstance)).hide) {
options.app._vueDevtools_hidden_ = true
return
}

Expand Down Expand Up @@ -156,6 +157,7 @@ export async function getAppRecord (app: any, ctx: BackendContext): Promise<AppR
if (record) {
return record
}
if (app._vueDevtools_hidden_) return null
return new Promise((resolve, reject) => {
let resolvers = appRecordPromises.get(app)
let timedOut = false
Expand Down

0 comments on commit 37aa0a4

Please sign in to comment.