Skip to content

Commit 15c9ca4

Browse files
authored
fix: pass null if no req.rawBody (#143)
1 parent 5227bb5 commit 15c9ca4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/files/firebase-to-svelte-kit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function toSvelteKitRequest(request) {
1313
headers: toSvelteKitHeaders(request.headers),
1414
rawBody: request.rawBody
1515
? request.rawBody
16-
: new Uint8Array(),
16+
: null,
1717
host,
1818
path: pathname,
1919
query: searchParameters,

tests/unit/src/files/firebase-to-svelte-kit.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ test('firebase-functions.https.request GET is converted to SvelteKit Incoming re
6767
host: 'us-central1-func.cloudfunctions.net',
6868
'x-forwarded-proto': 'https',
6969
},
70-
rawBody: new Uint8Array(),
70+
rawBody: null,
7171
host: 'https://us-central1-func.cloudfunctions.net',
7272
path: '/url',
7373
query: new URL('/url?some=thing', 'https://us-central1-func.cloudfunctions.net').searchParams,

0 commit comments

Comments
 (0)