fix return type

This commit is contained in:
siikamiika 2020-03-04 05:28:22 +02:00
parent 9ceb663f29
commit de8d9e6bf1

View File

@ -278,10 +278,11 @@ class Backend {
// Message handlers // Message handlers
async _onApiYomichanCoreReady(_params, sender) { _onApiYomichanCoreReady(_params, sender) {
// tab ID isn't set in background (e.g. browser_action) // tab ID isn't set in background (e.g. browser_action)
if (typeof sender.tab === 'undefined') { if (typeof sender.tab === 'undefined') {
return chrome.runtime.sendMessage({action: 'backendPrepared'}); chrome.runtime.sendMessage({action: 'backendPrepared'});
return Promise.resolve();
} }
const tabId = sender.tab.id; const tabId = sender.tab.id;