Skip to content

Commit 33e596b

Browse files
committed
perf: cache app record
1 parent ef5e5ff commit 33e596b

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export function getAppRecordId (app, defaultId?: string): string {
153153
}
154154

155155
export async function getAppRecord (app: any, ctx: BackendContext): Promise<AppRecord> {
156-
const record = ctx.appRecords.find(ar => ar.options.app === app)
156+
const record = app.__VUE_DEVTOOLS_APP_RECORD__ ?? ctx.appRecords.find(ar => ar.options.app === app)
157157
if (record) {
158158
return record
159159
}

0 commit comments

Comments
 (0)