Commit c9741880 authored by Tristan Cavelier's avatar Tristan Cavelier

getLeavesFromDocumentTree can except branch now

parent 0442ae5a
...@@ -254,11 +254,11 @@ jIO.addStorageType('revision', function (spec, my) { ...@@ -254,11 +254,11 @@ jIO.addStorageType('revision', function (spec, my) {
// search method fills [result] with the winner revision // search method fills [result] with the winner revision
search = function (document_tree) { search = function (document_tree) {
var i; var i;
if (document_tree.children.length === 0) {
// This node is a leaf
if (except !== undefined && except === document_tree.rev) { if (except !== undefined && except === document_tree.rev) {
return; return;
} }
if (document_tree.children.length === 0) {
// This node is a leaf
result.push(document_tree.rev); result.push(document_tree.rev);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment