Skip to content

Commit

Permalink
Check null for props serialization (#3657)
Browse files Browse the repository at this point in the history
* Check null for props serialization

* Add changeset
  • Loading branch information
Yuji Sugiura authored Jun 21, 2022
1 parent e671712 commit 7d4699b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-schools-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Check null for props serialization
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/server/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function convertToSerializedForm(value: any): [ValueOf<typeof PROP_TYPE>, any] {
return [PROP_TYPE.JSON, JSON.stringify(serializeArray(value))];
}
default: {
if (typeof value === 'object') {
if (value !== null && typeof value === 'object') {
return [PROP_TYPE.Value, serializeObject(value)];
} else {
return [PROP_TYPE.Value, value];
Expand Down

0 comments on commit 7d4699b

Please sign in to comment.