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
@@ -184,16 +184,17 @@ async function startRecord(option) {
* @param {Object} sender - The sender object containing information about the message sender.
* @param {Function} sendResponse - The function to send a response back to the message sender.
*/
chrome.runtime.onMessage.addListener(async (request, sender, sendResponse) => {
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
const { type, data } = request;
switch (type) {
case "start_capture":
await startRecord(data);
startRecord(data);
break;
default:
break;
}
sendResponse({});
return true;
});