Match-id-63a8d97173b3615bf3b6cf153df0aeefc8fe6fb1

This commit is contained in:
* 2022-04-27 20:17:34 +08:00 committed by *
parent c744bf3e0e
commit f76a09544d
1 changed files with 3 additions and 4 deletions

View File

@ -14,10 +14,9 @@ chrome.runtime.onConnect.addListener(function (port) {
const { type, data } = payload;
let passMessage;
if (type === InitDevToolPageConnection) {
if (!connections[data]) {
// 获取 panel 所在 tab 页的tabId
connections[data] = port;
}
// 记录 panel 所在 tab 页的tabId如果已经记录了覆盖原有port因为原有port可能关闭了
// 可能这次是 panel 发起的重新建立请求
connections[data] = port;
passMessage = packagePayload({ type: RequestAllVNodeTreeInfos }, DevToolBackground);
} else {
passMessage = message;