summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2011-01-21 14:05:07 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2011-01-21 14:05:07 +0000
commit9ce71f36273bad1f48d0b117799ad8d682451258 (patch)
tree2b84976aa8a5d94c04eae8671c6e1e4ad924c94c /src
parent4aaadc75abce9a6d662b807df92989505cba4a49 (diff)
Merged revision 1061809 from trunk
Fix strange result when passing a filter and a limit of 1 to /db/_changes Fixes COUCHDB-1037 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1061811 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_changes.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_changes.erl b/src/couchdb/couch_changes.erl
index 1e53161b..838f7e66 100644
--- a/src/couchdb/couch_changes.erl
+++ b/src/couchdb/couch_changes.erl
@@ -285,7 +285,7 @@ changes_enumerator(DocInfo, {Db, _, Prepend, FilterFun, Callback, UserAcc,
= DocInfo,
Results0 = FilterFun(DocInfo),
Results = [Result || Result <- Results0, Result /= null],
- Go = if Limit =< 1 -> stop; true -> ok end,
+ Go = if (Limit =< 1) andalso Results =/= [] -> stop; true -> ok end,
case Results of
[] ->
{Go, {Db, Seq, Prepend, FilterFun, Callback, UserAcc, ResponseType,