Skip to content

Commit

Permalink
fix(database): handle null serialize
Browse files Browse the repository at this point in the history
fixes #105
  • Loading branch information
triniwiz committed Jul 28, 2022
1 parent 9d06c1e commit e49d15b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/firebase-core/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function serialize(data: any, wrapPrimitives: boolean = false): any {
}

if (!data) {
return null;
return NSNull.new();
}

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

default:
return null;
return NSNull.new();
}
}

Expand Down

0 comments on commit e49d15b

Please sign in to comment.