Skip to content

Commit 5aaf59d

Browse files
committed
Changeset: Replace .apply() with spread operator
1 parent ca43d9b commit 5aaf59d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/static/js/Changeset.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,14 +870,14 @@ const textLinesMutator = (lines) => {
870870
curLine++;
871871
newLines.splice(0, 1);
872872
// insert the remaining new lines
873-
Array.prototype.push.apply(curSplice, newLines);
873+
curSplice.push(...newLines);
874874
curLine += newLines.length;
875875
// insert the remaining chars from the "old" line (e.g. the line we were in
876876
// when we started to insert new lines)
877877
curSplice.push(theLine.substring(lineCol));
878878
curCol = 0; // TODO(doc) why is this not set to the length of last line?
879879
} else {
880-
Array.prototype.push.apply(curSplice, newLines);
880+
curSplice.push(...newLines);
881881
curLine += newLines.length;
882882
}
883883
} else {

0 commit comments

Comments
 (0)