Fix storage of GeoPoints in nested arrays/maps.

This commit is contained in:
Nikita Lutsenko
2016-02-03 20:06:22 -08:00
parent 3cd7f7dd73
commit 437e7726ed

View File

@@ -367,7 +367,10 @@ function transformAtom(atom, force, options) {
return new Date(atom.iso);
}
if (atom.__type == 'GeoPoint') {
return [atom.longitude, atom.latitude];
if (!inArray && !inObject) {
return [atom.longitude, atom.latitude];
}
return atom;
}
if (atom.__type == 'Bytes') {
return new mongodb.Binary(new Buffer(atom.base64, 'base64'));