0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

handle null return from reduce

This commit is contained in:
Eliot Horowitz 2009-10-08 19:45:49 -04:00
parent e6069e40d9
commit 8269a86c5f

View File

@ -40,7 +40,7 @@ MR.doReduce = function( useDB ){
}
var r = $reduce( data.key , data.values );
if ( r.length && r[0] ){
if ( r && r.length && r[0] ){
data.values = r;
}
else{