Skip to content
Browse files

small map_reduce tweak

  • Loading branch information...
1 parent 7bb6978 commit 1e03878b17cefdb376406b3cfe79c8999fc3ec4d @kraih committed Feb 10, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Mango/Collection.pm
View
4 lib/Mango/Collection.pm
@@ -107,14 +107,14 @@ sub map_reduce {
$command => sub {
my ($db, $err, $doc) = @_;
my $result
- = $doc->{results} ? $doc->{results} : $db->collection($doc->{result});
+ = $doc->{result} ? $db->collection($doc->{result}) : $doc->{results};
$self->$cb($err, $result);
}
) if $cb;
# Blocking
my $doc = $db->command($command);
- return $doc->{results} ? $doc->{results} : $db->collection($doc->{result});
+ return $doc->{result} ? $db->collection($doc->{result}) : $doc->{results};
}
sub remove {

0 comments on commit 1e03878

Please sign in to comment.
Something went wrong with that request. Please try again.