From b37b2c524605ec49646ea82da88ff7bf5dc9961f Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 22 Jul 2017 16:57:52 +0300 Subject: [PATCH] fixup e463ca7e: use the actual tab index --- background/background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/background/background.js b/background/background.js index 643cba2c..8899a1f4 100644 --- a/background/background.js +++ b/background/background.js @@ -280,9 +280,9 @@ function updateIcon(tab, styles) { } // Vivaldi bug workaround: setBadgeText must follow setBadgeBackgroundColor chrome.browserAction.setBadgeBackgroundColor({color}); - getTab(tab.id).then(() => { + getTab(tab.id).then(realTab => { // skip pre-rendered tabs - if (tab.index >= 0) { + if (realTab.index >= 0) { chrome.browserAction.setBadgeText({text, tabId: tab.id}); } });