Fix for my links ending with a slash (#25841)

This commit is contained in:
Bram Kragten 2025-06-19 14:51:11 +02:00 committed by GitHub
parent 65e78de41c
commit 6aa8a24aad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);