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:
andythigpen 2015-03-14 11:32:34 -05:00
parent d0f545c247
commit 0b751949ae

View file

@ -24,9 +24,11 @@
var toast = this.$.toast;
var notification = notificationStore.lastNotification;
this.lastId = notification.id;
toast.text = notification.message;
toast.show();
if (notification) {
this.lastId = notification.id;
toast.text = notification.message;
toast.show();
}
}
},