Skip to content

Commit

Permalink
[fix] allow endpoint shadowing to work
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Aug 3, 2021
1 parent f8c3497 commit 1c43104
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-icons-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

[fix] allow endpoint shadowing to work
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/server/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script context="module">
/** @type {import("@sveltejs/kit").Load} */
export const load = ({ page }) => {
export const load = () => {
return {
props: {}
};
Expand Down

0 comments on commit 1c43104

Please sign in to comment.