Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 75ad999

Browse files
Tried to Serialize an unsupported type #1060
1 parent 6bb6ac5 commit 75ad999

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/firebase.android.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ firebase.toJsObject = javaObj => {
222222
return Number(String(javaObj));
223223
case 'java.util.Date':
224224
return new Date(javaObj.getTime());
225+
case 'com.google.firebase.Timestamp':
226+
return new Date(javaObj.toDate().getTime());
225227
case 'com.google.firebase.firestore.GeoPoint':
226228
return {
227229
"latitude": javaObj.getLatitude(),

0 commit comments

Comments
 (0)