From e4a936c5f151ffbc12a00310230bd71917788d6c Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sat, 13 Mar 2021 14:37:29 +0000 Subject: [PATCH] Fix cases when currentTab.url is falsy (reported for Yandex browser) --- .../src/extension-common/pages/options/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/index.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/index.js index bd41e62..cba4fe6 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/index.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/index.js @@ -42,7 +42,7 @@ chrome.runtime.getBackgroundPage( (bgWindow) => ); // winChrome.runtime.sendMessage({ currentTab, eventName: 'POPUP_OPENED' }); - theState.flags.ifInsideOptionsPage = !currentTab || /.*:\/\/extensions\/\?options=/g.test(currentTab.url) || currentTab.url.startsWith('about:addons'); + theState.flags.ifInsideOptionsPage = !(currentTab && currentTab.url) || /.*:\/\/extensions\/\?options=/g.test(currentTab.url) || currentTab.url.startsWith('about:addons'); theState.flags.ifInsideEdgeOptionsPage = theState.flags.ifInsideOptionsPage && currentTab && currentTab.url.startsWith('edge://'); theState.currentTab = currentTab;