Skip to content

Commit 63626c4

Browse files
committed
Fix monitor actions when working with multiple instances
1 parent 97eb9d3 commit 63626c4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/browser/extension/background/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import openDevToolsWindow from './openWindow';
33
import { toContentScript } from './messaging';
44
import createMenu from './contextMenus';
55

6-
const store = createDevStore((action) => {
7-
toContentScript(action);
6+
const store = createDevStore((action, instance) => {
7+
toContentScript(action, instance);
88
});
99

1010
window.store = store;

src/browser/extension/background/messaging.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ chrome.notifications.onClicked.addListener(id => {
126126
if (id === 'redux-error') openDevToolsWindow('devtools-right');
127127
});
128128

129-
export function toContentScript(action) {
129+
export function toContentScript(action, id) {
130130
const message = { type: 'DISPATCH', action: action };
131-
let id = store.liftedStore.instance;
132-
if (!id || id === 'auto') id = store.id;
133131
if (id in panelConnections) {
134132
panelConnections[id].postMessage(message);
135133
} else {

0 commit comments

Comments
 (0)