From 0b751949ae0eec80e3af0c9bd00744b7cd6107e0 Mon Sep 17 00:00:00 2001 From: andythigpen Date: Sat, 14 Mar 2015 11:32:34 -0500 Subject: [PATCH] Fix JS notification error on initialization. The last notification is initially null resulting in an exception being thrown on startup. --- .../www_static/polymer/components/ha-notifications.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/frontend/www_static/polymer/components/ha-notifications.html b/homeassistant/components/frontend/www_static/polymer/components/ha-notifications.html index e712de1f71d..3072da99e9a 100644 --- a/homeassistant/components/frontend/www_static/polymer/components/ha-notifications.html +++ b/homeassistant/components/frontend/www_static/polymer/components/ha-notifications.html @@ -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(); + } } },