mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Fix discontinuity detection in revision traversal
This commit is contained in:
parent
186efe0b21
commit
360bb55dac
1 changed files with 2 additions and 2 deletions
|
@ -236,7 +236,6 @@ $.Class("RevisionCache",
|
|||
var direction_edges = direction ? current.previous : current.next;
|
||||
for (var granularity in Revision.granularities) {
|
||||
if (Math.abs(delta_revnum) >= Revision.granularities[granularity]) {
|
||||
console.log(delta_revnum, to.revnum, current.revnum);
|
||||
/*
|
||||
* the delta is larger than the granularity, let's use the granularity
|
||||
*TODO: what happens if we DON'T have the edge?
|
||||
|
@ -258,7 +257,8 @@ $.Class("RevisionCache",
|
|||
// next granularity level. BUT, if we are at the lowest
|
||||
// granularity and don't have an edge, we've reached a DISCONTINUITY
|
||||
// and can no longer continue.
|
||||
found_discontinuity = true;
|
||||
if (Revision.granularities[granularity] == 1)
|
||||
found_discontinuity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue