You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for adding the new admin.firestore.FieldValue.arrayUnion() and admin.firestore.FieldValue.arrayRemove() features. They're super handy! I think I found a bug in it though. When you try to add an item which contains admin.firestore.FieldValue.serverTimestamp() via admin.firestore.FieldValue.arrayUnion(), the timestamp is never set and the corresponding field is dropped.
Steps to reproduce:
Run the repro below.
Expected result:
The database should look like this:
Actual result:
The database ends up looking like this:
If you switch the non-working admin.firestore.FieldValue.serverTimestamp() with new Date(), the expected result occurs.
Hey "jwngr", thanks for filing this issue. Note that we currently don't support Server Timestamps inside of Array values. It looks like we are missing some client-side validation here. We will add it shortly.
Environment
Problem
Thanks for adding the new
admin.firestore.FieldValue.arrayUnion()
andadmin.firestore.FieldValue.arrayRemove()
features. They're super handy! I think I found a bug in it though. When you try to add an item which containsadmin.firestore.FieldValue.serverTimestamp()
viaadmin.firestore.FieldValue.arrayUnion()
, the timestamp is never set and the corresponding field is dropped.Steps to reproduce:
Expected result:
The database should look like this:
Actual result:
The database ends up looking like this:
If you switch the non-working
admin.firestore.FieldValue.serverTimestamp()
withnew Date()
, the expected result occurs.Relevant Code:
Note that this also fails, resulting an an empty
someArray
array:The text was updated successfully, but these errors were encountered: