From 4f30e0b5b9dfd6f651b190e82f650c6b26d87301 Mon Sep 17 00:00:00 2001 From: Dmitry Omelchenko Date: Sat, 12 Nov 2022 17:30:27 +0200 Subject: [PATCH] fix advancedWordWrap concatenate when wrapping --- src/gameobjects/text/Text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/text/Text.js b/src/gameobjects/text/Text.js index e48f4c013..7ae6055b1 100644 --- a/src/gameobjects/text/Text.js +++ b/src/gameobjects/text/Text.js @@ -465,7 +465,7 @@ var Text = new Class({ .replace(/[ \n]*$/gi, ''); // Prepend remainder to next line - lines[i + 1] = remainder + ' ' + (lines[i + 1] || ''); + lines.splice(i + 1, 0, remainder); linesCount = lines.length; break; // Processing on this line