changesettracker: Remove unnecessary .numToAttrib check

This commit is contained in:
Richard Hansen 2021-11-16 18:08:06 -05:00
parent 3ec5e84737
commit d0e74ada2f

View file

@ -142,7 +142,6 @@ const makeChangesetTracker = (scheduler, apool, aceCallbacksProvider) => {
// Sanitize authorship // Sanitize authorship
// We need to replace all author attribs with thisSession.author, // We need to replace all author attribs with thisSession.author,
// in case they copy/pasted or otherwise inserted other peoples changes // in case they copy/pasted or otherwise inserted other peoples changes
if (apool.numToAttrib) {
let authorAttr; let authorAttr;
for (const attr in apool.numToAttrib) { for (const attr in apool.numToAttrib) {
if (apool.numToAttrib[attr][0] === 'author' && if (apool.numToAttrib[attr][0] === 'author' &&
@ -178,7 +177,7 @@ const makeChangesetTracker = (scheduler, apool, aceCallbacksProvider) => {
assem.endDocument(); assem.endDocument();
userChangeset = Changeset.pack(cs.oldLen, cs.newLen, assem.toString(), cs.charBank); userChangeset = Changeset.pack(cs.oldLen, cs.newLen, assem.toString(), cs.charBank);
Changeset.checkRep(userChangeset); Changeset.checkRep(userChangeset);
}
if (Changeset.isIdentity(userChangeset)) toSubmit = null; if (Changeset.isIdentity(userChangeset)) toSubmit = null;
else toSubmit = userChangeset; else toSubmit = userChangeset;
} }