fixup e463ca7e: use the actual tab index
This commit is contained in:
parent
93ff6d0f85
commit
b37b2c5246
|
@ -280,9 +280,9 @@ function updateIcon(tab, styles) {
|
||||||
}
|
}
|
||||||
// Vivaldi bug workaround: setBadgeText must follow setBadgeBackgroundColor
|
// Vivaldi bug workaround: setBadgeText must follow setBadgeBackgroundColor
|
||||||
chrome.browserAction.setBadgeBackgroundColor({color});
|
chrome.browserAction.setBadgeBackgroundColor({color});
|
||||||
getTab(tab.id).then(() => {
|
getTab(tab.id).then(realTab => {
|
||||||
// skip pre-rendered tabs
|
// skip pre-rendered tabs
|
||||||
if (tab.index >= 0) {
|
if (realTab.index >= 0) {
|
||||||
chrome.browserAction.setBadgeText({text, tabId: tab.id});
|
chrome.browserAction.setBadgeText({text, tabId: tab.id});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user