Skip to content

Commit

Permalink
fix: only run missing page check in dev mode (#8515)
Browse files Browse the repository at this point in the history
* fix: only run missing page check in dev mode

* Create good-zebras-deny.md
  • Loading branch information
benmccann authored Jan 13, 2023
1 parent 6c2a67c commit b9a3425
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/good-zebras-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": patch
---

fix: only run missing page check in dev mode
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/server/page/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export async function render_response({
: null;

if (page_config.ssr) {
if (!branch.at(-1)?.node.component) {
if (__SVELTEKIT_DEV__ && !branch.at(-1)?.node.component) {
// Can only be the leaf, layouts have a fallback component generated
throw new Error(`Missing +page.svelte component for route ${event.route.id}`);
}
Expand Down

0 comments on commit b9a3425

Please sign in to comment.