fix trying to notify using undefined data
This commit is contained in:
parent
287f8a490b
commit
d6d59fc8de
1 changed files with 9 additions and 5 deletions
|
@ -343,11 +343,15 @@ const app = new Vue({
|
||||||
if (this.notification) {
|
if (this.notification) {
|
||||||
this.notification.close()
|
this.notification.close()
|
||||||
}
|
}
|
||||||
this.notification = new Notification(a.name, {
|
if (a.artistName && a.artwork && a.name) {
|
||||||
body: a.artistName,
|
this.notification = new Notification(a.name, {
|
||||||
icon: (a.artwork.url.replace('/{w}x{h}bb', '/512x512bb')).replace('/2000x2000bb', '/35x35bb'),
|
body: a.artistName,
|
||||||
silent: true
|
icon: a.artwork.url
|
||||||
})
|
.replace('/{w}x{h}bb', '/512x512bb')
|
||||||
|
.replace('/2000x2000bb', '/35x35bb'),
|
||||||
|
silent: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue