openURL should not redirect incognito NTP to chrome URLs
This commit is contained in:
parent
cec649e0ee
commit
be9cfe072d
|
@ -143,7 +143,8 @@ function openURL({url, currentWindow = true}) {
|
|||
}
|
||||
getActiveTab().then(tab => {
|
||||
if (tab && tab.url == 'chrome://newtab/'
|
||||
&& (!url.startsWith(URLS.ownOrigin) || !tab.incognito)) {
|
||||
// prevent redirecting incognito NTP to a chrome URL as it crashes Chrome
|
||||
&& (!url.startsWith('chrome') || !tab.incognito)) {
|
||||
chrome.tabs.update({url}, resolve);
|
||||
} else {
|
||||
chrome.tabs.create(tab && !FIREFOX ? {url, openerTabId: tab.id} : {url}, resolve);
|
||||
|
|
Loading…
Reference in New Issue
Block a user