diff --git a/.changeset/smooth-icons-yell.md b/.changeset/smooth-icons-yell.md new file mode 100644 index 000000000000..d4f6c60753c3 --- /dev/null +++ b/.changeset/smooth-icons-yell.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +[fix] allow endpoint shadowing to work diff --git a/packages/kit/src/runtime/server/endpoint.js b/packages/kit/src/runtime/server/endpoint.js index 7ba8cd46adbf..e44642a544a9 100644 --- a/packages/kit/src/runtime/server/endpoint.js +++ b/packages/kit/src/runtime/server/endpoint.js @@ -41,7 +41,7 @@ export async function render_endpoint(request, route) { const preface = `Invalid response from route ${request.path}`; if (!response) { - return error('no response'); + return; } if (typeof response !== 'object') { return error(`${preface}: expected an object, got ${typeof response}`); diff --git a/packages/kit/test/apps/basics/src/routes/routing/fallthrough-simple/[page].svelte b/packages/kit/test/apps/basics/src/routes/routing/fallthrough-simple/[page].svelte index 39c6d9724549..a3a6b8392d2e 100644 --- a/packages/kit/test/apps/basics/src/routes/routing/fallthrough-simple/[page].svelte +++ b/packages/kit/test/apps/basics/src/routes/routing/fallthrough-simple/[page].svelte @@ -1,6 +1,6 @@