A fix for yandex browser(startsWith applied to undefined)

This commit is contained in:
ilyaigpetrov 2021-09-12 09:03:49 +00:00
parent ce22337928
commit cb0d991e94

View File

@ -43,7 +43,7 @@ chrome.runtime.getBackgroundPage( (bgWindow) =>
// winChrome.runtime.sendMessage({ currentTab, eventName: 'POPUP_OPENED' }); // 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.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; theState.currentTab = currentTab;