diff --git a/components/brave_rewards/resources/extension/brave_rewards/background.ts b/components/brave_rewards/resources/extension/brave_rewards/background.ts index 2f81fe09bf86..c31e0865aa60 100644 --- a/components/brave_rewards/resources/extension/brave_rewards/background.ts +++ b/components/brave_rewards/resources/extension/brave_rewards/background.ts @@ -46,18 +46,19 @@ chrome.runtime.onInstalled.addListener(function (details) { }) chrome.runtime.onStartup.addListener(function () { + chrome.storage.local.get(['is_dismissed'], function (result) { + if (result && result['is_dismissed'] === 'false') { + chrome.browserAction.setBadgeText({ + text: '1' + }) + } + }) + chrome.runtime.onConnect.addListener(function (externalPort) { chrome.storage.local.set({ 'rewards_panel_open': 'true' }) - chrome.storage.local.get(['is_dismissed'], function (result) { - if (result && result['is_dismissed'] === 'false') { - chrome.browserAction.setBadgeText({ - text: '1' - }) - } - }) externalPort.onDisconnect.addListener(function () { chrome.storage.local.set({ 'rewards_panel_open': 'false'