summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_key_tree.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_key_tree.erl b/src/couchdb/couch_key_tree.erl
index 2e3b3e3c..09712adf 100644
--- a/src/couchdb/couch_key_tree.erl
+++ b/src/couchdb/couch_key_tree.erl
@@ -43,7 +43,7 @@ merge_one([{Start, Tree}|Rest], {StartInsert, TreeInsert}, Acc, HasConflicts) ->
case merge_at([Tree], StartInsert - Start, [TreeInsert]) of
{ok, [Merged], Conflicts} ->
MergedStart = lists:min([Start, StartInsert]),
- merge_one(Rest, {MergedStart, Merged}, Acc, Conflicts or HasConflicts);
+ {ok, Rest ++ [{MergedStart, Merged} | Acc], Conflicts or HasConflicts};
no ->
AccOut = [{Start, Tree} | Acc],
merge_one(Rest, {StartInsert, TreeInsert}, AccOut, HasConflicts)