mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Changeset: Replace .apply()
with spread operator
This commit is contained in:
parent
9c17b03660
commit
6d5b737140
1 changed files with 2 additions and 2 deletions
|
@ -870,14 +870,14 @@ const textLinesMutator = (lines) => {
|
||||||
curLine++;
|
curLine++;
|
||||||
newLines.splice(0, 1);
|
newLines.splice(0, 1);
|
||||||
// insert the remaining new lines
|
// insert the remaining new lines
|
||||||
Array.prototype.push.apply(curSplice, newLines);
|
curSplice.push(...newLines);
|
||||||
curLine += newLines.length;
|
curLine += newLines.length;
|
||||||
// insert the remaining chars from the "old" line (e.g. the line we were in
|
// insert the remaining chars from the "old" line (e.g. the line we were in
|
||||||
// when we started to insert new lines)
|
// when we started to insert new lines)
|
||||||
curSplice.push(theLine.substring(lineCol));
|
curSplice.push(theLine.substring(lineCol));
|
||||||
curCol = 0; // TODO(doc) why is this not set to the length of last line?
|
curCol = 0; // TODO(doc) why is this not set to the length of last line?
|
||||||
} else {
|
} else {
|
||||||
Array.prototype.push.apply(curSplice, newLines);
|
curSplice.push(...newLines);
|
||||||
curLine += newLines.length;
|
curLine += newLines.length;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue