summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2008-12-16 21:19:03 +0000
committerJohn Christopher Anderson <jchris@apache.org>2008-12-16 21:19:03 +0000
commit3b27d154b2f36ff7a7514a6b0dbd29dd3715193b (patch)
tree0e5b25b2eaad36997dd7b79c0fe709eaaf157f32 /src
parent287dce73d2ededa4abb5f8c80599032dace46268 (diff)
fix COUCHDB-177. thanks Paul Carey and Paul Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@727156 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-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.