Fix: Crash in NodeApp.render if req.body is null (#6688)
* Add additional null check for req.body * Add changeset
This commit is contained in:
parent
2df24e9430
commit
2e92e9aa97
2 changed files with 6 additions and 1 deletions
5
.changeset/funny-pets-walk.md
Normal file
5
.changeset/funny-pets-walk.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add a additional check for `null` on the `req.body` check in `NodeApp.render`.
|
|
@ -48,7 +48,7 @@ export class NodeApp extends App {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof req.body === 'object' && Object.keys(req.body).length > 0) {
|
if (typeof req.body === 'object' && req.body !== null && Object.keys(req.body).length > 0) {
|
||||||
return super.render(
|
return super.render(
|
||||||
req instanceof Request
|
req instanceof Request
|
||||||
? req
|
? req
|
||||||
|
|
Loading…
Reference in a new issue