Check null for props serialization (#3657)
* Check null for props serialization * Add changeset
This commit is contained in:
parent
e67171252c
commit
7d4699b8f9
2 changed files with 6 additions and 1 deletions
5
.changeset/honest-schools-worry.md
Normal file
5
.changeset/honest-schools-worry.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Check null for props serialization
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue