mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-11 16:52:26 +03:00
Fix
This commit is contained in:
parent
3d4f16ded3
commit
ee43acccf5
|
@ -521,7 +521,7 @@ function messaging<S, A extends Action<string>>(
|
||||||
function disconnect(
|
function disconnect(
|
||||||
type: 'tab' | 'panel',
|
type: 'tab' | 'panel',
|
||||||
id: number | string,
|
id: number | string,
|
||||||
listener?: (message: any, port: chrome.runtime.Port) => void,
|
listener: (message: any, port: chrome.runtime.Port) => void,
|
||||||
) {
|
) {
|
||||||
return function disconnectListener() {
|
return function disconnectListener() {
|
||||||
const p = connections[type][id];
|
const p = connections[type][id];
|
||||||
|
@ -593,7 +593,7 @@ function onConnect<S, A extends Action<string>>(port: chrome.runtime.Port) {
|
||||||
store.dispatch(msg);
|
store.dispatch(msg);
|
||||||
};
|
};
|
||||||
port.onMessage.addListener(listener);
|
port.onMessage.addListener(listener);
|
||||||
port.onDisconnect.addListener(disconnect('panel', id));
|
port.onDisconnect.addListener(disconnect('panel', id, listener));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user