mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 10:26:35 +00:00
Fix demo routing (#2599)
This commit is contained in:
parent
c3f473c3e7
commit
13adee09da
@ -8,7 +8,7 @@ const { minimizer } = require("../config/babel.js");
|
||||
const isProd = process.env.NODE_ENV === "production";
|
||||
const chunkFilename = isProd ? "chunk.[chunkhash].js" : "[name].chunk.js";
|
||||
const buildPath = path.resolve(__dirname, "dist");
|
||||
const publicPath = "./";
|
||||
const publicPath = "/";
|
||||
|
||||
const latestBuild = false;
|
||||
|
||||
|
@ -98,10 +98,12 @@ export class HomeAssistantAppEl extends ext(HassBaseMixin(LitElement), [
|
||||
|
||||
private _routeChanged(ev) {
|
||||
const route = ev.detail.value as Route;
|
||||
|
||||
// If it's the first route that we process,
|
||||
// check if we should navigate away from /
|
||||
if (this._route === undefined && route.path === "/") {
|
||||
if (
|
||||
this._route === undefined &&
|
||||
(route.path === "" || route.path === "/")
|
||||
) {
|
||||
navigate(window, `/${localStorage.defaultPage || DEFAULT_PANEL}`, true);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user