From 8e2a21ec84afdf9ba79b214a73a3b3274f96e836 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Fri, 12 Mar 2021 20:25:14 +0100 Subject: [PATCH] arrow functions dont have arguments (#4943) --- src/static/js/Changeset.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js index b47979c19..8c3627b04 100644 --- a/src/static/js/Changeset.js +++ b/src/static/js/Changeset.js @@ -50,10 +50,9 @@ exports.error = (msg) => { * @param b {boolean} assertion condition * @param msgParts {string} error to be passed if it fails */ -exports.assert = (b, msgParts) => { +exports.assert = (b, ...msgParts) => { if (!b) { - const msg = Array.prototype.slice.call(arguments, 1).join(''); - exports.error(`Failed assertion: ${msg}`); + exports.error(`Failed assertion: ${msgParts.join('')}`); } };