mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
fix map/reduce shell helper
This commit is contained in:
parent
52140f7213
commit
af4a9aca50
@ -578,7 +578,7 @@ MapReduceResult.prototype.drop = function(){
|
||||
*/
|
||||
MapReduceResult.prototype.convertToSingleObject = function(){
|
||||
var z = {};
|
||||
var it = this.results != null ? this.results : this._coll;
|
||||
var it = this.results != null ? this.results : this._coll.find();
|
||||
it.forEach( function(a){ z[a._id] = a.value; } );
|
||||
return z;
|
||||
}
|
||||
|
@ -3365,7 +3365,7 @@ const StringData _jscode_raw_collection =
|
||||
"*/\n"
|
||||
"MapReduceResult.prototype.convertToSingleObject = function(){\n"
|
||||
"var z = {};\n"
|
||||
"var it = this.results != null ? this.results : this._coll;\n"
|
||||
"var it = this.results != null ? this.results : this._coll.find();\n"
|
||||
"it.forEach( function(a){ z[a._id] = a.value; } );\n"
|
||||
"return z;\n"
|
||||
"}\n"
|
||||
|
Loading…
Reference in New Issue
Block a user