Skip to content

Commit d0b5fea

Browse files
committed
fix: only send data on update if it's current component
1 parent abf3b9c commit d0b5fea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: packages/app-backend-core/src/component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { stringify, BridgeEvents, parse, SharedData } from '@vue-devtools/shared-utils'
22
import { AppRecord, BackendContext, BuiltinBackendFeature } from '@vue-devtools/app-backend-api'
33
import { getAppRecord } from './app'
4-
import { App, ComponentInstance, EditStatePayload, now } from '@vue/devtools-api'
4+
import { App, ComponentInstance, EditStatePayload } from '@vue/devtools-api'
55

66
const MAX_$VM = 10
77
const $vmQueue = []

Diff for: packages/app-backend-core/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async function connect () {
121121
const sendComponentUpdate = throttle(async (appRecord: AppRecord, id: string) => {
122122
try {
123123
// Update component inspector
124-
if (ctx.currentInspectedComponentId) {
124+
if (ctx.currentInspectedComponentId === id) {
125125
await sendSelectedComponentData(appRecord, ctx.currentInspectedComponentId, ctx)
126126
}
127127

0 commit comments

Comments
 (0)