0
0
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:
Eliot Horowitz 2011-03-02 10:36:32 -05:00
parent 52140f7213
commit af4a9aca50
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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"