Permalink
Browse files

MB-6895 Correct error processing for dev views

Change-Id: I51ad9fa63cc0b415cb992601c16c4b5c8f396c49
Reviewed-on: http://review.couchbase.org/24481
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  • Loading branch information...
1 parent da000c2 commit 356ef20516464c5bd0c22dec643bd27fba618d18 @fdmanana fdmanana committed Feb 9, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/couchdb/couch_view_mapreduce.erl
@@ -66,10 +66,12 @@ map(Doc) ->
{ok, Results} ->
Fun = fun({error, _Reason} = Error) ->
Error;
- ({K, V}) ->
- {?JSON_DECODE(K), ?JSON_DECODE(V)}
+ (KvList) ->
+ lists:map(
+ fun({K,V}) -> {?JSON_DECODE(K), ?JSON_DECODE(V)} end,
+ KvList)
end,
- {ok, [lists:map(Fun, FunResult) || FunResult <- Results]};
+ {ok, lists:map(Fun, Results)};
Error ->
throw(Error)
end.

0 comments on commit 356ef20

Please sign in to comment.