Commit ef537ed4 authored by Tristan Cavelier's avatar Tristan Cavelier

revisionstorage.js bug fix to pass tests

parent c42de5ff
......@@ -948,6 +948,10 @@
if (err) {
return command.error(err);
}
doc_tree = doc_tree.data;
if (typeof doc_tree.children === 'string') {
doc_tree.children = JSON.parse(doc_tree.children);
}
revs_info = priv.getWinnerRevsInfo(doc_tree);
document_revision =
rows.document_revisions[doc_id + "." + revs_info[0].rev];
......@@ -973,7 +977,7 @@
functions.success = function () {
functions.finished -= 1;
if (functions.finished === 0) {
command.success(result);
command.success({"data": result});
}
};
priv.send(command, "allDocs", null, option, function (err, response) {
......@@ -1028,7 +1032,7 @@
functions.finished += 1;
if (rows.revision_trees[i].doc) {
functions.falseResponseGenerator(
rows.revision_trees[i].doc,
{"data": rows.revision_trees[i].doc},
functions.fillResultGenerator(rows.revision_trees[i].id)
);
} else {
......
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