diff options
Diffstat (limited to 'db/geo/2d.cpp')
-rw-r--r-- | db/geo/2d.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/db/geo/2d.cpp b/db/geo/2d.cpp index b873490..40df5e2 100644 --- a/db/geo/2d.cpp +++ b/db/geo/2d.cpp @@ -2647,7 +2647,10 @@ namespace mongo { BSONObjBuilder bb( arr.subobjStart( BSONObjBuilder::numStr( x++ ) ) ); bb.append( "dis" , dis ); - if( includeLocs ) bb.append( "loc" , p._pt ); + if( includeLocs ){ + if( p._pt.couldBeArray() ) bb.append( "loc", BSONArray( p._pt ) ); + else bb.append( "loc" , p._pt ); + } bb.append( "obj" , p._o ); bb.done(); } |