From 11a10f1aa665a020cce1881d0597a4da3dc5f301 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Thu, 29 Dec 2022 17:39:06 +0000 Subject: [PATCH] add sendResponse call to onMessage callback this prevents phantom errors in popup logs --- extension/src/js/background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension/src/js/background.js b/extension/src/js/background.js index 2be9b09..16740e2 100644 --- a/extension/src/js/background.js +++ b/extension/src/js/background.js @@ -134,7 +134,7 @@ chrome.commands.onCommand.addListener(command => { }) -chrome.runtime.onMessage.addListener((message: any, sender: chrome$MessageSender, sendResponse) => { // eslint-disable-line no-unused-vars +chrome.runtime.onMessage.addListener((message: any, sender: chrome$MessageSender, sendResponse) => { if (message.method === 'logging') { console.error("[%s] %o", message.source, message.data) } @@ -143,6 +143,7 @@ chrome.runtime.onMessage.addListener((message: any, sender: chrome$MessageSender const tag_str = message.tag_str; // todo await capture(comment, tag_str) + sendResponse() } })