From d225b6aad039b9122efb944d5909ca3bf18122a8 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 3 Jun 2021 13:53:11 -0700 Subject: [PATCH] Allow ingress links to have more data --- hassio/src/ingress-view/hassio-ingress-view.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hassio/src/ingress-view/hassio-ingress-view.ts b/hassio/src/ingress-view/hassio-ingress-view.ts index 24d050acb9..565ef300ae 100644 --- a/hassio/src/ingress-view/hassio-ingress-view.ts +++ b/hassio/src/ingress-view/hassio-ingress-view.ts @@ -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);