Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow server-only load functions to return more than JSON #6318

Merged
merged 25 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
Rich-Harris committed Aug 26, 2022
commit 60c8d6620f81a6dc89abb422af549dc7201212c6
2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@sveltejs/vite-plugin-svelte": "^1.0.1",
"cookie": "^0.5.0",
"devalue": "^3.1.1",
"devalue": "^3.1.2",
"kleur": "^4.1.4",
"magic-string": "^0.26.2",
"mime": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/server/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function data_response(data) {
}
});
} catch (e) {
return new Response(`throw new Error(${JSON.stringify(e.message)})`, {
return new Response(`throw new Error(${JSON.stringify(/** @type {any} */ (e).message)})`, {
headers: {
'content-type': 'application/javascript'
}
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.