mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-13 02:26:53 -04:00
ensure targetRev is limited to headRev in getInternalRevisionAText
This commit is contained in:
parent
415156f8a7
commit
f4c3fd5a73
2 changed files with 6 additions and 0 deletions
|
@ -172,6 +172,9 @@ class Pad {
|
|||
|
||||
async getInternalRevisionAText(targetRev) {
|
||||
const keyRev = this.getKeyRevisionNumber(targetRev);
|
||||
const headRev = this.getHeadRevisionNumber();
|
||||
if (targetRev > headRev)
|
||||
targetRev = headRev;
|
||||
const [keyAText, changesets] = await Promise.all([
|
||||
this._getKeyRevisionAText(keyRev),
|
||||
Promise.all(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue