Skip to content

Commit

Permalink
fix(Util): allow empty strings in splitMessage (#6437)
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Rost committed Aug 18, 2021
1 parent 93a83c2 commit d6e6244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/Util.js
Expand Up @@ -70,7 +70,7 @@ class Util extends null {
* @returns {string[]}
*/
static splitMessage(text, { maxLength = 2000, char = '\n', prepend = '', append = '' } = {}) {
text = Util.verifyString(text, RangeError, 'MESSAGE_CONTENT_TYPE', false);
text = Util.verifyString(text);
if (text.length <= maxLength) return [text];
let splitText = [text];
if (Array.isArray(char)) {
Expand Down

0 comments on commit d6e6244

Please sign in to comment.