Allow ingress links to have more data

This commit is contained in:
Paulus Schoutsen 2021-06-03 13:53:11 -07:00
parent e87a2b36cf
commit d225b6aad0

View File

@ -128,10 +128,12 @@ class HassioIngressView extends LitElement {
return;
}
const addon = this.route.path.substr(1);
const addon = this.route.path.substr(1).split("/")[0];
const oldRoute = changedProps.get("route") as this["route"] | undefined;
const oldAddon = oldRoute ? oldRoute.path.substr(1) : undefined;
const oldAddon = oldRoute
? oldRoute.path.substr(1).split("/")[0]
: undefined;
if (addon && addon !== oldAddon) {
this._fetchData(addon);