webNavigation.getFrame may return null on overridden pages, fix a3401b05

This commit is contained in:
tophf 2017-03-26 00:14:41 +03:00
parent 54ab65989d
commit d32ad30f8f

View File

@ -136,7 +136,7 @@ function getTabRealURL(tab) {
resolve(tab.url); resolve(tab.url);
} else { } else {
chrome.webNavigation.getFrame({tabId: tab.id, frameId: 0, processId: -1}, frame => { chrome.webNavigation.getFrame({tabId: tab.id, frameId: 0, processId: -1}, frame => {
frame && resolve(frame.url); resolve(frame && frame.url || '');
}); });
} }
}); });