Commit 93d52ec9 authored by Tristan Cavelier's avatar Tristan Cavelier

fix getRevisionFromPosition index bug

parent 85c84215
...@@ -355,8 +355,8 @@ jIO.addStorageType('revision', function (spec, my) { ...@@ -355,8 +355,8 @@ jIO.addStorageType('revision', function (spec, my) {
priv.getRevisionFromPosition = function (revs_info, rev_pos) { priv.getRevisionFromPosition = function (revs_info, rev_pos) {
var i; var i;
for (i = revs_info.length - 1; i >= 0; i -= 1) { for (i = revs_info.length - 1; i >= 0; i -= 1) {
if (priv.revisionToArray(revs_info.rev)[0] === rev_pos) { if (priv.revisionToArray(revs_info[i].rev)[0] === rev_pos) {
return revs_info.rev; return revs_info[i].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