-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[fix] handle undefined body on endpoint output #1808
Merged
benmccann
merged 12 commits into
sveltejs:master
from
ignatiusmb:i1351/response-without-body
Jul 10, 2021
Merged
[fix] handle undefined body on endpoint output #1808
benmccann
merged 12 commits into
sveltejs:master
from
ignatiusmb:i1351/response-without-body
Jul 10, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 3db0b35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
benmccann
reviewed
Jul 3, 2021
benmccann
reviewed
Jul 9, 2021
Nice. This one closes a 1.0 issue 😄 |
sidharthv96
added a commit
to sidharthv96/kit
that referenced
this pull request
Jul 11, 2021
* 'master' of github.com:sidharthv96/kit: (1114 commits) Version Packages (next) (sveltejs#1858) Bump vite-plugin-svelte to 1.0.0-next.12 (sveltejs#1869) [fix] preserve user defined config and files on `svelte-kit package` (sveltejs#1735) [fix] handle undefined body on endpoint output (sveltejs#1808) [fix] copy essentials files from root on packaging (sveltejs#1747) [docs] sort config alphabetically (sveltejs#1867) add config.kit.package.emitTypes option (sveltejs#1852) [fix] add $lib alias to js/tsconfig (sveltejs#1860) Pass along custom properties added to Error (sveltejs#1821) Version Packages (next) (sveltejs#1840) Improve grammar in packages FAQ Docs for writing an adapter (sveltejs#1846) Additional documentation around pnpx changeset usage [feat] expose Vite.js `mode` from `$app/env` (sveltejs#1789) Service worker files exclusion support (sveltejs#1645) chore: Enable `vite.server.fs.strict` internally by default (sveltejs#1842) Test with the latest version of Svelte (sveltejs#1848) [docs] don't need to run pnpm install twice Improve HN example docs [fix] correct `ReadOnlyFormData` generator implementation (sveltejs#1837) ...
utkarshkukreti
added a commit
to utkarshkukreti/sveltejs-kit
that referenced
this pull request
Jul 12, 2021
A recent change [1] introduced a bug which converts `null` to `{}` (empty object) when returned from endpoints. This commit explicitly checks for `undefined` and does not modify `null` responses. [1]: sveltejs#1808
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will add an empty object as the default value to the response body.
An empty string was put in place as the first choice, but it would fail on
res.json()
where a status of 200 would usually expect. It was changed in favor of an empty object so it wouldn't throw onres.json()
and could still be read byres.text()
the same.Fixes #1351