Skip to content

Commit 459d425

Browse files
Set timestamp field to ISOString during wrapDate_
When setting a field to a timestampValue format the Date object needs to be converted to an ISO string before sent to Firestore.
1 parent 06ca121 commit 459d425

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FirestoreDocument.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function wrapBoolean_ (boolean) {
163163
}
164164

165165
function wrapDate_ (date) {
166-
return {'timestampValue': date}
166+
return {'timestampValue': date.toISOString()}
167167
}
168168

169169
function wrapLatLong_ (latLong) {

0 commit comments

Comments
 (0)