diff --git a/server/shell.ts b/server/shell.ts index 0fdde38..022b414 100644 --- a/server/shell.ts +++ b/server/shell.ts @@ -935,6 +935,8 @@ export function renderShell(opts: ShellOptions): string { } else { window.location.href = window.__rspaceNavUrl(spaceSlug, moduleId); } + }).catch(() => { + window.location.href = window.__rspaceNavUrl(spaceSlug, moduleId); }); } else { window.location.href = window.__rspaceNavUrl(spaceSlug, moduleId); @@ -956,6 +958,8 @@ export function renderShell(opts: ShellOptions): string { } else { window.location.href = window.__rspaceNavUrl(spaceSlug, moduleId); } + }).catch(() => { + window.location.href = window.__rspaceNavUrl(spaceSlug, moduleId); }); } else { window.location.href = window.__rspaceNavUrl(spaceSlug, moduleId); diff --git a/shared/tab-cache.ts b/shared/tab-cache.ts index 23f37ce..1c89977 100644 --- a/shared/tab-cache.ts +++ b/shared/tab-cache.ts @@ -192,7 +192,9 @@ export class TabCache { app.appendChild(loadingPane); try { - const resp = await fetch(fetchUrl); + const resp = await fetch(fetchUrl, { + headers: { "Accept": "text/html" }, + }); if (!resp.ok) { loadingPane.remove(); return false;