Fallback to index page if unable to parse the indexPage config option (#1034)
parent
b7c56a8379
commit
67f997258d
|
@ -246,8 +246,12 @@ export class HttpServer {
|
||||||
url.pathname === "/"
|
url.pathname === "/"
|
||||||
) {
|
) {
|
||||||
// Serve the UI (index.html)
|
// Serve the UI (index.html)
|
||||||
const indexPage =
|
let indexPage = "index";
|
||||||
parsePageRef(this.spaceServer.config?.indexPage!).page;
|
try {
|
||||||
|
indexPage = parsePageRef(this.spaceServer.config?.indexPage!).page;
|
||||||
|
} catch (e: any) {
|
||||||
|
console.error("Error parsing index page from config", e);
|
||||||
|
}
|
||||||
return this.renderHtmlPage(this.spaceServer, indexPage, c);
|
return this.renderHtmlPage(this.spaceServer, indexPage, c);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue