From 6d5b737140979c03391efb89332d2d879134eda8 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 11 Oct 2021 17:37:43 -0400 Subject: [PATCH] Changeset: Replace `.apply()` with spread operator --- src/static/js/Changeset.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js index 426835915..dab1e5afc 100644 --- a/src/static/js/Changeset.js +++ b/src/static/js/Changeset.js @@ -870,14 +870,14 @@ const textLinesMutator = (lines) => { curLine++; newLines.splice(0, 1); // insert the remaining new lines - Array.prototype.push.apply(curSplice, newLines); + curSplice.push(...newLines); curLine += newLines.length; // insert the remaining chars from the "old" line (e.g. the line we were in // when we started to insert new lines) curSplice.push(theLine.substring(lineCol)); curCol = 0; // TODO(doc) why is this not set to the length of last line? } else { - Array.prototype.push.apply(curSplice, newLines); + curSplice.push(...newLines); curLine += newLines.length; } } else {