Skip to content

Commit

Permalink
fix: only send data on update if it's current component
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 4, 2024
1 parent abf3b9c commit d0b5fea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/app-backend-core/src/component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { stringify, BridgeEvents, parse, SharedData } from '@vue-devtools/shared-utils'
import { AppRecord, BackendContext, BuiltinBackendFeature } from '@vue-devtools/app-backend-api'
import { getAppRecord } from './app'
import { App, ComponentInstance, EditStatePayload, now } from '@vue/devtools-api'
import { App, ComponentInstance, EditStatePayload } from '@vue/devtools-api'

const MAX_$VM = 10
const $vmQueue = []
Expand Down
2 changes: 1 addition & 1 deletion packages/app-backend-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async function connect () {
const sendComponentUpdate = throttle(async (appRecord: AppRecord, id: string) => {
try {
// Update component inspector
if (ctx.currentInspectedComponentId) {
if (ctx.currentInspectedComponentId === id) {
await sendSelectedComponentData(appRecord, ctx.currentInspectedComponentId, ctx)
}

Expand Down

0 comments on commit d0b5fea

Please sign in to comment.