mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-13 13:28:14 +00:00
Fix crash related to null text
This commit is contained in:
parent
07aac12a2b
commit
9ef13e5f67
@ -48,6 +48,7 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
|
|||||||
text = text.slice(0, actionMatch.index) + text.slice(actionMatch.index + actionMatch[2].length + 4);
|
text = text.slice(0, actionMatch.index) + text.slice(actionMatch.index + actionMatch[2].length + 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (text) {
|
||||||
// Predetermine overflow line breaks to avoid words breaking while displaying
|
// Predetermine overflow line breaks to avoid words breaking while displaying
|
||||||
const textWords = text.split(' ');
|
const textWords = text.split(' ');
|
||||||
let lastLineCount = 1;
|
let lastLineCount = 1;
|
||||||
@ -68,6 +69,7 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
text = newText;
|
text = newText;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.textTimer) {
|
if (this.textTimer) {
|
||||||
this.textTimer.remove();
|
this.textTimer.remove();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user