Skip to content

Commit

Permalink
Check null for props serialization (withastro#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 848b453 commit 920f4d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 920f4d3

Please sign in to comment.