Fixed messages from content scripts being "eaten" by the wrong dispatcher when UI is open (thanks skriptimaahinen).

This commit is contained in:
hackademix 2018-08-23 16:23:49 +02:00
parent fc6251c0ab
commit 4ce026a16c
1 changed files with 2 additions and 0 deletions

View File

@ -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 = {