Prevent JS error in messages

This commit is contained in:
Rob Garrison 2019-01-27 18:37:12 -06:00
parent e8ba51f940
commit 1bdd0512ae

View File

@ -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);
}); });