mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
arrow functions dont have arguments (#4943)
This commit is contained in:
parent
0b9bf4a78e
commit
8e2a21ec84
1 changed files with 2 additions and 3 deletions
|
@ -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('')}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue