diff options
author | hackademix | 2018-08-23 16:23:49 +0200 |
---|---|---|
committer | hackademix | 2018-08-23 16:23:49 +0200 |
commit | 4ce026a16cc6143470a3f509b9cef2010ac24c29 (patch) | |
tree | 284df5ad9e382947a90d8b67b1546d8505ba1a35 | |
parent | fc6251c0ab5baf917f892166c40f33cb9d7bff13 (diff) | |
download | noscript-4ce026a16cc6143470a3f509b9cef2010ac24c29.tar.gz noscript-4ce026a16cc6143470a3f509b9cef2010ac24c29.tar.xz noscript-4ce026a16cc6143470a3f509b9cef2010ac24c29.zip |
Fixed messages from content scripts being "eaten" by the wrong dispatcher when UI is open (thanks skriptimaahinen).
-rw-r--r-- | src/lib/Messages.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Messages.js b/src/lib/Messages.js index fc7df6a..a58598a 100644 --- a/src/lib/Messages.js +++ b/src/lib/Messages.js @@ -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 = { |