forked from woofmeow/straywild
Change: empty check to reject all whitespace kinds
This commit is contained in:
parent
09b7a78533
commit
0cba516b82
1 changed files with 3 additions and 2 deletions
|
|
@ -893,8 +893,9 @@ func _on_entry_text_submitted(_value: String) -> void:
|
|||
func _send() -> void:
|
||||
if _send_pending:
|
||||
return
|
||||
var body := _entry.text
|
||||
if body.strip_edges().is_empty():
|
||||
var strippable_spaces := RegEx.create_from_string("(^\\s+|\\s+$)")
|
||||
var body := strippable_spaces.sub(_entry.text, "", true)
|
||||
if body.is_empty():
|
||||
close_chat()
|
||||
return
|
||||
_send_pending = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue