From 0dd247e69898598e377919fe9e345d4dd916b62c Mon Sep 17 00:00:00 2001 From: Fan Pei Date: Mon, 8 May 2023 23:39:27 +0900 Subject: [PATCH] fix: Always updated the inspected component --- packages/app-backend-core/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app-backend-core/src/index.ts b/packages/app-backend-core/src/index.ts index 66ea11d69..1dacda744 100644 --- a/packages/app-backend-core/src/index.ts +++ b/packages/app-backend-core/src/index.ts @@ -121,8 +121,8 @@ async function connect () { const sendComponentUpdate = throttle(async (appRecord: AppRecord, id: string) => { try { // Update component inspector - if (id && isSubscribed(BridgeSubscriptions.SELECTED_COMPONENT_DATA, sub => sub.payload.instanceId === id)) { - await sendSelectedComponentData(appRecord, id, ctx) + if (ctx.currentInspectedComponentId) { + await sendSelectedComponentData(appRecord, ctx.currentInspectedComponentId, ctx) } // Update tree (tags)