Skip to content

Commit

Permalink
fix(firestore, web): fix an issue in the update method using `FieldVa…
Browse files Browse the repository at this point in the history
…lue.arrayUnion` or `Map` (#10481)
  • Loading branch information
Lyokone authored Feb 17, 2023
1 parent 6388c62 commit d1998aa
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,10 @@ class DocumentReference
}

Future<void> update(Map<firestore_interop.FieldPath, dynamic> data) {
final alternatingFieldValues =
data.keys.map((e) => [e, data[e]]).expand((e) => e).toList();
final alternatingFieldValues = data.keys
.map((e) => [jsify(e), jsify(data[e])])
.expand((e) => e)
.toList();

return handleThenable(callMethod(firestore_interop.updateDoc, 'apply', [
null,
Expand Down

0 comments on commit d1998aa

Please sign in to comment.