From edbc9de29129791cc614072c4fdc3a018232eab0 Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 6 Mar 2024 22:47:09 -0300 Subject: [PATCH] =?UTF-8?q?Fixed=20Uncaught=20TypeError=20when=20using=20?= =?UTF-8?q?=C2=A7k=20without=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/minecraft-tip.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/minecraft-tip.js b/js/minecraft-tip.js index 911c297..6e86447 100644 --- a/js/minecraft-tip.js +++ b/js/minecraft-tip.js @@ -323,6 +323,7 @@ class TextRenderer { } getRandomTextFrom(originalText) { + if (originalText == '') return originalText; let newText = ''; for (const char of originalText) { const width = this.getWidth(char, false);