Skip to content

Commit

Permalink
fix: use client router for error page only if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 10, 2024
1 parent 2b9f301 commit b06195f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vike/client/client-routing-runtime/renderPageClientSide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,13 @@ async function renderPageClientSide(renderArgs: RenderArgs): Promise<void> {
_pageId: errorPageId
})

const isClientRoutable = await isClientSideRoutable(pageContext._pageId, pageContext)
if (isRenderOutdated()) return
if (!isClientRoutable) {
redirectHard(urlOriginal)
return
}

try {
objectAssign(
pageContext,
Expand Down

0 comments on commit b06195f

Please sign in to comment.