aboutsummaryrefslogtreecommitdiff
path: root/features/hud
diff options
context:
space:
mode:
Diffstat (limited to 'features/hud')
-rw-r--r--features/hud/HudTextElement.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/features/hud/HudTextElement.js b/features/hud/HudTextElement.js
index 582b778..c5a0635 100644
--- a/features/hud/HudTextElement.js
+++ b/features/hud/HudTextElement.js
@@ -41,9 +41,16 @@ class HudTextElement{
getText(){
let text = this.text
let blackText = this.blackText
- if(this.editTempTextV && Date.now()-this.editTempTimeV < 100){
- text = this.editTempTextV
- blackText = "&0" + ChatLib.removeFormatting(text)
+ if(Date.now()-this.editTempTimeV < 100){
+ if(this.editTempTextV){
+ text = this.editTempTextV
+ blackText = "&0" + ChatLib.removeFormatting(text)
+ }
+
+ if(ChatLib.removeFormatting(text) === ""){
+ text = "&0Empty string"
+ blackText = "&0Empty string"
+ }
}
return [text.split("\n"), blackText.split("\n")]
}