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 === "/"
|
||||
) {
|
||||
// Serve the UI (index.html)
|
||||
const indexPage =
|
||||
parsePageRef(this.spaceServer.config?.indexPage!).page;
|
||||
let indexPage = "index";
|
||||
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);
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue