Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 356ef20516464c5bd0c22dec643bd27fba618d18 1 parent da000c2
@fdmanana fdmanana authored fdmanana committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/couchdb/couch_view_mapreduce.erl
View
8 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.
Please sign in to comment.
Something went wrong with that request. Please try again.