From 715aab74d5b9b2778efeb9c97277a58a6eec183b Mon Sep 17 00:00:00 2001 From: dessant Date: Sun, 3 Mar 2019 08:52:27 +0200 Subject: [PATCH] fix: close client app before checking ping response --- src/utils/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/app.js b/src/utils/app.js index bfd411d..eb83779 100755 --- a/src/utils/app.js +++ b/src/utils/app.js @@ -99,14 +99,14 @@ async function pingClientApp({ message: {command: 'ping'} }); - if (checkResponse && (!rsp.success || rsp.data !== 'pong')) { - throw new Error(`Client app response: ${rsp.data}`); - } - if (stop) { await browser.runtime.sendMessage({id: 'stopClientApp'}); } + if (checkResponse && (!rsp.success || rsp.data !== 'pong')) { + throw new Error(`Client app response: ${rsp.data}`); + } + return rsp; }