mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 06:16:33 +00:00
Fix panels with subpaths (#2528)
This commit is contained in:
parent
6d329bdd1f
commit
547f829f5b
@ -177,10 +177,16 @@ class PartialPanelResolver extends LitElement {
|
|||||||
// Manual splitting
|
// Manual splitting
|
||||||
const route = this.route!;
|
const route = this.route!;
|
||||||
const dividerPos = route.path.indexOf("/", 1);
|
const dividerPos = route.path.indexOf("/", 1);
|
||||||
this._routeTail = {
|
this._routeTail =
|
||||||
prefix: route.path.substr(0, dividerPos),
|
dividerPos === -1
|
||||||
path: route.path.substr(dividerPos),
|
? {
|
||||||
};
|
prefix: route.path,
|
||||||
|
path: "",
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
prefix: route.path.substr(0, dividerPos),
|
||||||
|
path: route.path.substr(dividerPos),
|
||||||
|
};
|
||||||
|
|
||||||
// If just route changed, no need to process further.
|
// If just route changed, no need to process further.
|
||||||
if (changedProps.size === 1) {
|
if (changedProps.size === 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user