Fixed messages from content scripts being "eaten" by the wrong dispatcher when UI is open (thanks skriptimaahinen).
This commit is contained in:
parent
fc6251c0ab
commit
4ce026a16c
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
let handlers = new Set();
|
||||
|
||||
let forever = new Promise(resolve => {});
|
||||
let dispatch = async (msg, sender) => {
|
||||
let {_messageName} = msg;
|
||||
for (let h of handlers) {
|
||||
|
@ -10,6 +11,7 @@
|
|||
return await f(msg, sender);
|
||||
}
|
||||
}
|
||||
await forever;
|
||||
};
|
||||
|
||||
var Messages = {
|
||||
|
|
Loading…
Reference in New Issue