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,12 +114,14 @@ const msg = (() => {
continue; continue;
} }
const message = {data: dataObj, target}; const message = {data: dataObj, target};
if (tab && tab.id) {
requests.push( requests.push(
tabSend(tab.id, message, options) tabSend(tab.id, message, options)
.then(unwrapData) .then(unwrapData)
.catch(ignoreError) .catch(ignoreError)
); );
} }
}
return Promise.all(requests); return Promise.all(requests);
}); });
} }