summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_httpd_view.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_httpd_view.erl b/src/couchdb/couch_httpd_view.erl
index f1c8616f..13842149 100644
--- a/src/couchdb/couch_httpd_view.erl
+++ b/src/couchdb/couch_httpd_view.erl
@@ -153,10 +153,10 @@ output_reduce_view(Req, View, QueryArgs, Keys) ->
send_chunk(Resp, "{\"rows\":["),
lists:foldl(
fun(Key, AccSeparator) ->
- {ok, _} = couch_view:fold_reduce(View, Dir, {Key, StartDocId},
+ {ok, {NewAcc, _, _}} = couch_view:fold_reduce(View, Dir, {Key, StartDocId},
{Key, EndDocId}, GroupRowsFun, RespFun,
{AccSeparator, Skip, Count}),
- "," % Switch to comma
+ NewAcc % Switch to comma
end,
"", Keys), % Start with no comma
send_chunk(Resp, "]}"),
@@ -456,4 +456,4 @@ finish_view_fold(Req, TotalRows, FoldResult) ->
end_json_response(Resp);
Error ->
throw(Error)
- end. \ No newline at end of file
+ end.