Skip to content

Commit 437e772

Browse files
committed
Fix storage of GeoPoints in nested arrays/maps.
1 parent 3cd7f7d commit 437e772

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

transform.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,10 @@ function transformAtom(atom, force, options) {
367367
return new Date(atom.iso);
368368
}
369369
if (atom.__type == 'GeoPoint') {
370-
return [atom.longitude, atom.latitude];
370+
if (!inArray && !inObject) {
371+
return [atom.longitude, atom.latitude];
372+
}
373+
return atom;
371374
}
372375
if (atom.__type == 'Bytes') {
373376
return new mongodb.Binary(new Buffer(atom.base64, 'base64'));

0 commit comments

Comments
 (0)