Skip to content

Commit d1998aa

Browse files
authored
fix(firestore, web): fix an issue in the update method using FieldValue.arrayUnion or Map (#10481)
1 parent 6388c62 commit d1998aa

File tree

1 file changed

+4
-2
lines changed
  • packages/cloud_firestore/cloud_firestore_web/lib/src/interop

1 file changed

+4
-2
lines changed

packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,10 @@ class DocumentReference
367367
}
368368

369369
Future<void> update(Map<firestore_interop.FieldPath, dynamic> data) {
370-
final alternatingFieldValues =
371-
data.keys.map((e) => [e, data[e]]).expand((e) => e).toList();
370+
final alternatingFieldValues = data.keys
371+
.map((e) => [jsify(e), jsify(data[e])])
372+
.expand((e) => e)
373+
.toList();
372374

373375
return handleThenable(callMethod(firestore_interop.updateDoc, 'apply', [
374376
null,

0 commit comments

Comments
 (0)