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;
|
continue;
|
||||||
}
|
}
|
||||||
const message = {data: dataObj, target};
|
const message = {data: dataObj, target};
|
||||||
requests.push(
|
if (tab && tab.id) {
|
||||||
tabSend(tab.id, message, options)
|
requests.push(
|
||||||
.then(unwrapData)
|
tabSend(tab.id, message, options)
|
||||||
.catch(ignoreError)
|
.then(unwrapData)
|
||||||
);
|
.catch(ignoreError)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Promise.all(requests);
|
return Promise.all(requests);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user