mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-05 11:32:20 +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,7 +23,14 @@ exports.notify = function({url, errorStack, messageId}, {lists, notificationPref
|
|||||||
var tab, tabBrowser;
|
var tab, tabBrowser;
|
||||||
if (browser){
|
if (browser){
|
||||||
window = tabUtils.getOwnerWindow(browser);
|
window = tabUtils.getOwnerWindow(browser);
|
||||||
|
if (!window){
|
||||||
|
return;
|
||||||
|
}
|
||||||
tab = tabUtils.getTabForBrowser(browser);
|
tab = tabUtils.getTabForBrowser(browser);
|
||||||
|
if (!tab){
|
||||||
|
// page ist displayed in preview
|
||||||
|
return;
|
||||||
|
}
|
||||||
tabBrowser = tabUtils.getTabBrowser(window);
|
tabBrowser = tabUtils.getTabBrowser(window);
|
||||||
}
|
}
|
||||||
else if (window){
|
else if (window){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user