Don't try to cancel notifications if the browser does not support it
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
80b363872e
commit
010812ef06
|
@ -145,6 +145,11 @@ export default class TaskModel extends AbstractModel {
|
|||
}
|
||||
|
||||
async cancelScheduledNotifications() {
|
||||
if (!('showTrigger' in Notification.prototype)) {
|
||||
console.debug('This browser does not support triggered notifications')
|
||||
return
|
||||
}
|
||||
|
||||
const registration = await navigator.serviceWorker.getRegistration()
|
||||
if (typeof registration === 'undefined') {
|
||||
return
|
||||
|
|
Reference in New Issue