mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
changesettracker: Remove unnecessary .numToAttrib
check
This commit is contained in:
parent
3ec5e84737
commit
d0e74ada2f
1 changed files with 34 additions and 35 deletions
|
@ -142,7 +142,6 @@ const makeChangesetTracker = (scheduler, apool, aceCallbacksProvider) => {
|
|||
// Sanitize authorship
|
||||
// We need to replace all author attribs with thisSession.author,
|
||||
// in case they copy/pasted or otherwise inserted other peoples changes
|
||||
if (apool.numToAttrib) {
|
||||
let authorAttr;
|
||||
for (const attr in apool.numToAttrib) {
|
||||
if (apool.numToAttrib[attr][0] === 'author' &&
|
||||
|
@ -178,7 +177,7 @@ const makeChangesetTracker = (scheduler, apool, aceCallbacksProvider) => {
|
|||
assem.endDocument();
|
||||
userChangeset = Changeset.pack(cs.oldLen, cs.newLen, assem.toString(), cs.charBank);
|
||||
Changeset.checkRep(userChangeset);
|
||||
}
|
||||
|
||||
if (Changeset.isIdentity(userChangeset)) toSubmit = null;
|
||||
else toSubmit = userChangeset;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue