aboutsummaryrefslogtreecommitdiff
path: root/features/hud/HudTextElement.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-13 20:57:16 +0800
committerGitHub <noreply@github.com>2021-12-13 20:57:16 +0800
commit017c6f892afe12b53d7f6f0b17f4055468315dcb (patch)
tree494189875108bc1c0d0955761239087adf406306 /features/hud/HudTextElement.js
parent35b89852096c48945e55e9d550a417a963a9ad74 (diff)
parentf1e5f8810c4faf5a36d7b542d92284a3319d33ce (diff)
downloadSoopyV2-017c6f892afe12b53d7f6f0b17f4055468315dcb.tar.gz
SoopyV2-017c6f892afe12b53d7f6f0b17f4055468315dcb.tar.bz2
SoopyV2-017c6f892afe12b53d7f6f0b17f4055468315dcb.zip
Merge pull request #1 from Soopyboo32/Senither-lb
Senither lb
Diffstat (limited to 'features/hud/HudTextElement.js')
-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")]
}