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

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

Lines changed: 1 addition & 1 deletion
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 = []

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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy