diff --git a/js/pacosako_ui.js b/js/pacosako_ui.js index 029a9c1..ae87164 100644 --- a/js/pacosako_ui.js +++ b/js/pacosako_ui.js @@ -631,11 +631,15 @@ $(function (){ function closeNotifications(){ try { navigator.serviceWorker.ready.then(function(registration){ - registration.getNotifications({tag: 'notice'}).then(function(notifications){ - for (const notification of notifications) { - notification.close(); + try { + if ('getNotifications' in registration) { + registration.getNotifications({tag: 'notice'}).then(function(notifications){ + for (const notification of notifications) { + notification.close(); + } + }); } - }); + } catch (err) {} }); } catch (err) {} }