Skip to content

Commit

Permalink
fix: pass null if no req.rawBody (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
jthegedus authored Sep 16, 2021
1 parent 5227bb5 commit 15c9ca4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/files/firebase-to-svelte-kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function toSvelteKitRequest(request) {
headers: toSvelteKitHeaders(request.headers),
rawBody: request.rawBody
? request.rawBody
: new Uint8Array(),
: null,
host,
path: pathname,
query: searchParameters,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/src/files/firebase-to-svelte-kit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test('firebase-functions.https.request GET is converted to SvelteKit Incoming re
host: 'us-central1-func.cloudfunctions.net',
'x-forwarded-proto': 'https',
},
rawBody: new Uint8Array(),
rawBody: null,
host: 'https://us-central1-func.cloudfunctions.net',
path: '/url',
query: new URL('/url?some=thing', 'https://us-central1-func.cloudfunctions.net').searchParams,
Expand Down

0 comments on commit 15c9ca4

Please sign in to comment.