Add guard for addon

This commit is contained in:
Paulus Schoutsen 2019-04-06 12:32:45 -07:00
parent b07f95f956
commit cadcd845cc

View File

@ -60,7 +60,7 @@ class HassioIngressView extends LitElement {
const oldRoute = changedProps.get("route") as this["route"] | undefined;
const oldAddon = oldRoute ? extractAddon(oldRoute.path) : undefined;
if (addon !== oldAddon) {
if (addon && addon !== oldAddon) {
this._createSession();
this._fetchAddonInfo(addon);
}