Skip to content

Commit 05b93fe

Browse files
JuanKamranAsif
authored andcommitted
DevTools: Fix passing extensionId in evaled postMessage calls (facebook#22590)
1 parent 36fe5ef commit 05b93fe

File tree

1 file changed

+10
-10
lines changed
  • packages/react-devtools-extensions/src

1 file changed

+10
-10
lines changed

packages/react-devtools-extensions/src/main.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function createPanelIfReactLoaded() {
216216
chrome.devtools.inspectedWindow.eval(
217217
`window.postMessage({
218218
source: 'react-devtools-inject-backend',
219-
extensionId: "${CURRENT_EXTENSION_ID}"
219+
extensionId: "${CURRENT_EXTENSION_ID}",
220220
}, '*');`,
221221
function(response, evalError) {
222222
if (evalError) {
@@ -361,15 +361,15 @@ function createPanelIfReactLoaded() {
361361
chrome.runtime.onMessage.addListener(onPortMessage);
362362

363363
chrome.devtools.inspectedWindow.eval(`
364-
window.postMessage({
365-
source: 'react-devtools-extension',
366-
extensionId: "${CURRENT_EXTENSION_ID}"
367-
payload: {
368-
type: 'fetch-file-with-cache',
369-
url: "${url}",
370-
},
371-
});
372-
`);
364+
window.postMessage({
365+
source: 'react-devtools-extension',
366+
extensionId: "${CURRENT_EXTENSION_ID}",
367+
payload: {
368+
type: 'fetch-file-with-cache',
369+
url: "${url}",
370+
},
371+
}, '*');
372+
`);
373373
};
374374

375375
// Fetching files from the extension won't make use of the network cache

0 commit comments

Comments
 (0)