From 6aa8a24aad23da47fc5410947b83c66d6f85b31b Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 19 Jun 2025 14:51:11 +0200 Subject: [PATCH] Fix for my links ending with a slash (#25841) --- src/panels/my/ha-panel-my.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panels/my/ha-panel-my.ts b/src/panels/my/ha-panel-my.ts index 39e97a566b..c1e091aaa1 100644 --- a/src/panels/my/ha-panel-my.ts +++ b/src/panels/my/ha-panel-my.ts @@ -349,7 +349,10 @@ class HaPanelMy extends LitElement { connectedCallback() { super.connectedCallback(); - const path = this.route.path.substring(1); + const path = this.route.path.substring( + 1, + this.route.path.endsWith("/") ? this.route.path.length - 1 : undefined + ); const hasSupervisor = isComponentLoaded(this.hass, "hassio"); this._redirect = getRedirect(path);