Skip to content

Commit

Permalink
perf: cache app record
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 26, 2022
1 parent ef5e5ff commit 33e596b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app-backend-core/src/app.ts
Expand Up @@ -153,7 +153,7 @@ export function getAppRecordId (app, defaultId?: string): string {
}

export async function getAppRecord (app: any, ctx: BackendContext): Promise<AppRecord> {
const record = ctx.appRecords.find(ar => ar.options.app === app)
const record = app.__VUE_DEVTOOLS_APP_RECORD__ ?? ctx.appRecords.find(ar => ar.options.app === app)
if (record) {
return record
}
Expand Down

0 comments on commit 33e596b

Please sign in to comment.