From 517d5cc63becfef1017b8f58ae1138025fb7f6ec Mon Sep 17 00:00:00 2001 From: Artsemi Sinitsa Date: Tue, 24 Dec 2019 12:48:16 +0300 Subject: [PATCH] Fix issue --- src/js/background.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/background.js b/src/js/background.js index ab93475..e740035 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -7,6 +7,10 @@ import { EVENTS } from '../lib/constants' async function activationHandler({ tabId }) { const tab = await chrome.tabs.get(tabId); + if(!tab.active){ + return + } + const url = tab.url || tab.pendingUrl; if (url.match(/https:\/\/streeteasy.com\/building\/|https:\/\/streeteasy.com\/rental\//)) { await chrome.browserAction.setIcon({ path: 'bowery_icon.png' });