Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 85141cd

Browse files
author
Je
committed
fix: fix custom 404 page render
1 parent 945af1a commit 85141cd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

renderer.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ export function renderPage(
2929
} else {
3030
if (pageProps.Page == null) {
3131
if (E404) {
32-
el = React.createElement(
33-
E400MissingDefaultExportAsComponent,
34-
{ name: 'Custom 404' }
35-
)
32+
if (util.isLikelyReactComponent(E404)) {
33+
el = React.createElement(E404)
34+
} else {
35+
el = React.createElement(
36+
E400MissingDefaultExportAsComponent,
37+
{ name: 'Custom 404' }
38+
)
39+
}
3640
} else {
3741
el = React.createElement(E404Page)
3842
}

0 commit comments

Comments
 (0)