Этот коммит содержится в:
=Corey Hulen
2016-02-17 09:59:55 -05:00
родитель 2ec3762fb2
Коммит 4b07624f11

Просмотреть файл

@@ -160,6 +160,7 @@ export function notifyMe(title, body, channel) {
} }
if (permission === 'granted') { if (permission === 'granted') {
try {
var notification = new Notification(title, {body, tag: body, icon: '/static/images/icon50x50.png'}); var notification = new Notification(title, {body, tag: body, icon: '/static/images/icon50x50.png'});
notification.onclick = () => { notification.onclick = () => {
window.focus(); window.focus();
@@ -172,6 +173,9 @@ export function notifyMe(title, body, channel) {
setTimeout(() => { setTimeout(() => {
notification.close(); notification.close();
}, 5000); }, 5000);
} catch (e) {
console.error(e); //eslint-disable-line no-console
}
} }
}); });
} }