Fix storage of GeoPoints in nested arrays/maps.
This commit is contained in:
@@ -367,8 +367,11 @@ function transformAtom(atom, force, options) {
|
|||||||
return new Date(atom.iso);
|
return new Date(atom.iso);
|
||||||
}
|
}
|
||||||
if (atom.__type == 'GeoPoint') {
|
if (atom.__type == 'GeoPoint') {
|
||||||
|
if (!inArray && !inObject) {
|
||||||
return [atom.longitude, atom.latitude];
|
return [atom.longitude, atom.latitude];
|
||||||
}
|
}
|
||||||
|
return atom;
|
||||||
|
}
|
||||||
if (atom.__type == 'Bytes') {
|
if (atom.__type == 'Bytes') {
|
||||||
return new mongodb.Binary(new Buffer(atom.base64, 'base64'));
|
return new mongodb.Binary(new Buffer(atom.base64, 'base64'));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user