Check null for props serialization (#3657)

* Check null for props serialization

* Add changeset
This commit is contained in:
Yuji Sugiura 2022-06-22 00:26:27 +09:00 committed by GitHub
parent e67171252c
commit 7d4699b8f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Check null for props serialization

View file

@ -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];