send empty responses and remove async; its not helping

This commit is contained in:
makaveli10
2023-10-18 16:52:47 +02:00
parent 1938dfb490
commit a2b5220738
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -173,13 +173,13 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
if (type === "STOP") {
remove_element();
sendResponse({data: "STOPPED"});
return;
return true;
} else if (type === "showWaitPopup"){
initPopupElement();
showPopup(`Estimated wait time ~ ${Math.round(data)} minutes`);
sendResponse({data: "popup"});
return;
return true;
}
init_element();
@@ -234,4 +234,5 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
}
sendResponse({});
return true;
});