From ef4c6421d52778e58eb6e4fa60eca45f5f88b043 Mon Sep 17 00:00:00 2001 From: CPK Date: Thu, 11 May 2023 03:17:18 +0800 Subject: [PATCH] fix #23 --- scripts/TextManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/TextManager.js b/scripts/TextManager.js index 93f5757..2ae504d 100644 --- a/scripts/TextManager.js +++ b/scripts/TextManager.js @@ -43,7 +43,7 @@ class TextManager { if (textFrame == "off") { return; } } - this._thisWaitTime = isFastForward ? 50 : text.length * 300 + 500; + this._thisWaitTime = isFastForward ? 50 : (text?.length || 1) * 300 + 500; if (!this._txtFrameMap.has(textFrame)) { this._txtFrameMap.set(textFrame, new PIXI.Sprite(this._loader.resources[`textFrame${textFrame}`].texture));