lint: changesettracker.js long-lines
parent
f5f4e3a6d1
commit
3635cb6ca6
|
@ -111,8 +111,10 @@ const makeChangesetTracker = (scheduler, apool, aceCallbacksProvider) => {
|
|||
|
||||
const preferInsertingAfterUserChanges = true;
|
||||
const oldUserChangeset = userChangeset;
|
||||
userChangeset = Changeset.follow(c2, oldUserChangeset, preferInsertingAfterUserChanges, apool);
|
||||
const postChange = Changeset.follow(oldUserChangeset, c2, !preferInsertingAfterUserChanges, apool);
|
||||
userChangeset = Changeset.follow(
|
||||
c2, oldUserChangeset, preferInsertingAfterUserChanges, apool);
|
||||
const postChange = Changeset.follow(
|
||||
oldUserChangeset, c2, !preferInsertingAfterUserChanges, apool);
|
||||
|
||||
const preferInsertionAfterCaret = true; // (optAuthor && optAuthor > thisAuthor);
|
||||
applyingNonUserChanges = true;
|
||||
|
@ -135,7 +137,9 @@ const makeChangesetTracker = (scheduler, apool, aceCallbacksProvider) => {
|
|||
// add forEach function to Array.prototype for IE8
|
||||
if (!('forEach' in Array.prototype)) {
|
||||
Array.prototype.forEach = function (action, that /* opt*/) {
|
||||
for (let i = 0, n = this.length; i < n; i++) if (i in this) action.call(that, this[i], i, this);
|
||||
for (let i = 0, n = this.length; i < n; i++) {
|
||||
if (i in this) action.call(that, this[i], i, this);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -143,10 +147,13 @@ const makeChangesetTracker = (scheduler, apool, aceCallbacksProvider) => {
|
|||
const authorId = parent.parent.pad.myUserInfo.userId;
|
||||
|
||||
// Sanitize authorship
|
||||
// We need to replace all author attribs with thisSession.author, in case they copy/pasted or otherwise inserted other peoples changes
|
||||
// We need to replace all author attribs with thisSession.author,
|
||||
// in case they copy/pasted or otherwise inserted other peoples changes
|
||||
if (apool.numToAttrib) {
|
||||
for (const attr in apool.numToAttrib) {
|
||||
if (apool.numToAttrib[attr][0] == 'author' && apool.numToAttrib[attr][1] == authorId) var authorAttr = Number(attr).toString(36);
|
||||
if (apool.numToAttrib[attr][0] == 'author' && apool.numToAttrib[attr][1] == authorId) {
|
||||
var authorAttr = Number(attr).toString(36);
|
||||
}
|
||||
}
|
||||
|
||||
// Replace all added 'author' attribs with the value of the current user
|
||||
|
|
Loading…
Reference in New Issue