From b38bab08b158ddc5bbfa201f4ded52ee1af11705 Mon Sep 17 00:00:00 2001 From: Juan Date: Tue, 19 Oct 2021 17:43:59 -0400 Subject: [PATCH] DevTools: Fix passing extensionId in evaled postMessage calls (#22590) --- .../react-devtools-extensions/src/main.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/react-devtools-extensions/src/main.js b/packages/react-devtools-extensions/src/main.js index 5203b511035d5..60ed0fcb1a9ec 100644 --- a/packages/react-devtools-extensions/src/main.js +++ b/packages/react-devtools-extensions/src/main.js @@ -216,7 +216,7 @@ function createPanelIfReactLoaded() { chrome.devtools.inspectedWindow.eval( `window.postMessage({ source: 'react-devtools-inject-backend', - extensionId: "${CURRENT_EXTENSION_ID}" + extensionId: "${CURRENT_EXTENSION_ID}", }, '*');`, function(response, evalError) { if (evalError) { @@ -361,15 +361,15 @@ function createPanelIfReactLoaded() { chrome.runtime.onMessage.addListener(onPortMessage); chrome.devtools.inspectedWindow.eval(` - window.postMessage({ - source: 'react-devtools-extension', - extensionId: "${CURRENT_EXTENSION_ID}" - payload: { - type: 'fetch-file-with-cache', - url: "${url}", - }, - }); - `); + window.postMessage({ + source: 'react-devtools-extension', + extensionId: "${CURRENT_EXTENSION_ID}", + payload: { + type: 'fetch-file-with-cache', + url: "${url}", + }, + }, '*'); + `); }; // Fetching files from the extension won't make use of the network cache