From 4ce026a16cc6143470a3f509b9cef2010ac24c29 Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 23 Aug 2018 16:23:49 +0200 Subject: Fixed messages from content scripts being "eaten" by the wrong dispatcher when UI is open (thanks skriptimaahinen). --- src/lib/Messages.js | 2 ++ 1 file changed, 2 insertions(+) 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 = { -- cgit v1.2.3