mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 01:36:49 +00:00
No idea, but it seems to work? (#2526)
This commit is contained in:
parent
0e1eaa18df
commit
9a86b06092
@ -50,11 +50,13 @@ export class HomeAssistant extends ext(PolymerElement, [
|
||||
route="[[route]]"
|
||||
pattern="/:panel"
|
||||
data="{{routeData}}"
|
||||
tail="{{subroute}}"
|
||||
></app-route>
|
||||
<template is="dom-if" if="[[showMain]]" restamp>
|
||||
<home-assistant-main
|
||||
hass="[[hass]]"
|
||||
route="[[route]]"
|
||||
tail="[[subroute]]"
|
||||
></home-assistant-main>
|
||||
</template>
|
||||
|
||||
|
@ -81,6 +81,9 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
||||
return {
|
||||
hass: Object,
|
||||
narrow: Boolean,
|
||||
tail: {
|
||||
type: Object,
|
||||
},
|
||||
route: {
|
||||
type: Object,
|
||||
observer: "_routeChanged",
|
||||
@ -135,7 +138,7 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
||||
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (this.route.prefix === "") {
|
||||
if (this.tail.prefix === "") {
|
||||
this.navigate(`/${localStorage.defaultPage || DEFAULT_PANEL}`, true);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user