mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
fix appendRevision (#5805)
* test cov * Added test for checking if a new pad can be created and deleted. --------- Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
This commit is contained in:
parent
2434ae32a1
commit
4cf1be966d
2 changed files with 19 additions and 1 deletions
|
@ -75,7 +75,7 @@ class Pad {
|
|||
|
||||
async appendRevision(aChangeset, authorId = '') {
|
||||
const newAText = Changeset.applyToAText(aChangeset, this.atext, this.pool);
|
||||
if (newAText.text === this.atext.text && newAText.attribs === this.atext.attribs) {
|
||||
if (newAText.text === this.atext.text && newAText.attribs === this.atext.attribs && this.head !== -1) {
|
||||
return this.head;
|
||||
}
|
||||
Changeset.copyAText(newAText, this.atext);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue