Fixing JS bug with droid
Этот коммит содержится в:
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user