Prevent JS error in messages
This commit is contained in:
parent
e8ba51f940
commit
1bdd0512ae
12
js/msg.js
12
js/msg.js
|
@ -114,11 +114,13 @@ const msg = (() => {
|
|||
continue;
|
||||
}
|
||||
const message = {data: dataObj, target};
|
||||
requests.push(
|
||||
tabSend(tab.id, message, options)
|
||||
.then(unwrapData)
|
||||
.catch(ignoreError)
|
||||
);
|
||||
if (tab && tab.id) {
|
||||
requests.push(
|
||||
tabSend(tab.id, message, options)
|
||||
.then(unwrapData)
|
||||
.catch(ignoreError)
|
||||
);
|
||||
}
|
||||
}
|
||||
return Promise.all(requests);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user