Fix JS notification error on initialization.
The last notification is initially null resulting in an exception being thrown on startup.
This commit is contained in:
parent
d0f545c247
commit
0b751949ae
1 changed files with 5 additions and 3 deletions
|
@ -24,9 +24,11 @@
|
||||||
var toast = this.$.toast;
|
var toast = this.$.toast;
|
||||||
var notification = notificationStore.lastNotification;
|
var notification = notificationStore.lastNotification;
|
||||||
|
|
||||||
this.lastId = notification.id;
|
if (notification) {
|
||||||
toast.text = notification.message;
|
this.lastId = notification.id;
|
||||||
toast.show();
|
toast.text = notification.message;
|
||||||
|
toast.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue