This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

small map_reduce tweak

  • Loading branch information...
kraih committed Feb 10, 2013
1 parent 7bb6978 commit 1e03878b17cefdb376406b3cfe79c8999fc3ec4d
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Mango/Collection.pm
View
@@ -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.