Skip to content

Commit 44545c5

Browse files
committed
🐛 fix dates and geopoints
Fix #155, #144
1 parent 99fa6b0 commit 44545c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/vuexfire/src/utils.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ export function extractRefs (doc, oldDoc, path = '', result = [{}, {}]) {
2323
} else if (Array.isArray(ref)) {
2424
tot[0][key] = Array(ref.length).fill(null)
2525
extractRefs(ref, oldDoc[key], path + key + '.', [tot[0][key], tot[1]])
26+
} else if (
27+
ref instanceof Date ||
28+
(ref.longitude && ref.latitude) // GeoPoint
29+
) {
30+
tot[0][key] = ref
2631
} else if (isObject(ref)) {
2732
tot[0][key] = {}
2833
extractRefs(ref, oldDoc[key], path + key + '.', [tot[0][key], tot[1]])

0 commit comments

Comments
 (0)