mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 10:31:54 +01:00
Prevented error message when notifications where triggered on preview, which is not possible.
This commit is contained in:
parent
ec1ae73cda
commit
9c7e842f4b
@ -23,10 +23,17 @@ exports.notify = function({url, errorStack, messageId}, {lists, notificationPref
|
||||
var tab, tabBrowser;
|
||||
if (browser){
|
||||
window = tabUtils.getOwnerWindow(browser);
|
||||
if (!window){
|
||||
return;
|
||||
}
|
||||
tab = tabUtils.getTabForBrowser(browser);
|
||||
if (!tab){
|
||||
// page ist displayed in preview
|
||||
return;
|
||||
}
|
||||
tabBrowser = tabUtils.getTabBrowser(window);
|
||||
}
|
||||
else if (window){
|
||||
else if (window){
|
||||
tab = tabUtils.getTabForContentWindow(window);
|
||||
tabBrowser = tabUtils.getTabBrowserForTab(tab);
|
||||
browser = tabUtils.getBrowserForTab(tab);
|
||||
|
Loading…
x
Reference in New Issue
Block a user