From 9ff19d7d55f23293a56bd1837ad3ff6ff81c0258 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 21 Apr 2024 16:48:42 -0400 Subject: [PATCH] Fix --- commands/edit-image-text/tweet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/edit-image-text/tweet.js b/commands/edit-image-text/tweet.js index 464a6512..6a1eca08 100644 --- a/commands/edit-image-text/tweet.js +++ b/commands/edit-image-text/tweet.js @@ -201,7 +201,7 @@ module.exports = class TweetCommand extends Command { async fillTextWithEmoji(ctx, text, x, y, maxLineLen, emojiSize) { const wrapped = await wrapText(ctx, text, maxLineLen); const emoji = text.match(emojiRegex()); - if (!emoji.length) { + if (!emoji) { ctx.fillText(lines.join('\n'), x, y); return ctx; } @@ -209,7 +209,7 @@ module.exports = class TweetCommand extends Command { const line = wrapped[currentLine]; const lineNoEmoji = line.split(emojiRegex()); const lineEmoji = line.match(emojiRegex()); - if (!lineEmoji.length) { + if (!lineEmoji) { ctx.fillText(line, x, y + (23 * currentLine) + (9 * currentLine)); continue; }