From cb0d991e9452719dfaff0cbd7745aec4cf94a313 Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sun, 12 Sep 2021 09:03:49 +0000 Subject: [PATCH] A fix for yandex browser(startsWith applied to undefined) --- .../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 cba4fe6..6a05839 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 @@ -43,7 +43,7 @@ chrome.runtime.getBackgroundPage( (bgWindow) => // winChrome.runtime.sendMessage({ currentTab, eventName: 'POPUP_OPENED' }); 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.flags.ifInsideEdgeOptionsPage = theState.flags.ifInsideOptionsPage && currentTab && currentTab.url && currentTab.url.startsWith('edge://'); theState.currentTab = currentTab;