mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 12:06:31 +02:00
removed error message when notification can not be closed
This commit is contained in:
parent
f93f2958b7
commit
b563a9d3ca
2 changed files with 7 additions and 1 deletions
|
@ -122,7 +122,12 @@ exports.notify = function({url, errorStack, messageId}, {lists, notificationPref
|
|||
var displayTime = notificationPref.displayTime();
|
||||
if (displayTime){
|
||||
notification.hideTimeout = setTimeout(function(){
|
||||
notification.close();
|
||||
try {
|
||||
notification.close();
|
||||
}
|
||||
catch(e){
|
||||
// tab is not in focus
|
||||
}
|
||||
}, displayTime * 1000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue