silence some useless warnings in console
This commit is contained in:
parent
8efce3220a
commit
e5e21c0a15
|
@ -372,6 +372,7 @@ function updateIcon(tab, styles) {
|
|||
}
|
||||
// Vivaldi bug workaround: setBadgeText must follow setBadgeBackgroundColor
|
||||
chrome.browserAction.setBadgeBackgroundColor({color});
|
||||
setTimeout(() => {
|
||||
getTab(tab.id).then(realTab => {
|
||||
// skip pre-rendered tabs
|
||||
if (realTab.index >= 0) {
|
||||
|
@ -379,6 +380,7 @@ function updateIcon(tab, styles) {
|
|||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -427,7 +429,7 @@ function onRuntimeMessage(request, sender, sendResponseInternal) {
|
|||
|
||||
case 'closeTab':
|
||||
chrome.tabs.remove(request.tabId || sender.tab.id, () => {
|
||||
if (chrome.runtime.lastError) {
|
||||
if (chrome.runtime.lastError && request.tabId !== sender.tab.id) {
|
||||
sendResponse(new Error(chrome.runtime.lastError.message));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -299,7 +299,7 @@ var prefs = new function Prefs() {
|
|||
|
||||
// Polyfill for Firefox < 53 https://bugzilla.mozilla.org/show_bug.cgi?id=1220494
|
||||
function getSync() {
|
||||
if ('sync' in chrome.storage) {
|
||||
if ('sync' in chrome.storage && !chrome.runtime.id.includes('@temporary')) {
|
||||
return chrome.storage.sync;
|
||||
}
|
||||
const crappyStorage = {};
|
||||
|
|
Loading…
Reference in New Issue
Block a user