diff --git a/lib/notifications.js b/lib/notifications.js index 8219c35..349afd7 100644 --- a/lib/notifications.js +++ b/lib/notifications.js @@ -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); } diff --git a/releaseNotes.txt b/releaseNotes.txt index 0a2967c..f8044cc 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -9,6 +9,7 @@ Version 0.3.6: fixes: - faking webGL - added readPixels for webGL2 + - removed error message when notification can not be closed Version 0.3.5 new features: