Skip to content

Commit e49d15b

Browse files
committed
fix(database): handle null serialize
fixes #105
1 parent 9d06c1e commit e49d15b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firebase-core/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function serialize(data: any, wrapPrimitives: boolean = false): any {
3838
}
3939

4040
if (!data) {
41-
return null;
41+
return NSNull.new();
4242
}
4343

4444
if (Array.isArray(data)) {
@@ -54,7 +54,7 @@ export function serialize(data: any, wrapPrimitives: boolean = false): any {
5454
}
5555

5656
default:
57-
return null;
57+
return NSNull.new();
5858
}
5959
}
6060

0 commit comments

Comments
 (0)