Skip to content

Commit 7367c57

Browse files
committed
return early to prevent further decoding
1 parent e871022 commit 7367c57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/kit/src/core/node/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ export function getRawBody(req) {
5252

5353
if (isContentTypeTextual(type)) {
5454
const encoding = h['content-encoding'] || 'utf-8';
55-
fulfil(new TextDecoder(encoding).decode(data));
55+
return fulfil(new TextDecoder(encoding).decode(data));
5656
}
5757

58-
return fulfil(data);
58+
fulfil(data);
5959
});
6060
});
6161
}

0 commit comments

Comments
 (0)