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:
|
func _send() -> void:
|
||||||
if _send_pending:
|
if _send_pending:
|
||||||
return
|
return
|
||||||
var body := _entry.text
|
var strippable_spaces := RegEx.create_from_string("(^\\s+|\\s+$)")
|
||||||
if body.strip_edges().is_empty():
|
var body := strippable_spaces.sub(_entry.text, "", true)
|
||||||
|
if body.is_empty():
|
||||||
close_chat()
|
close_chat()
|
||||||
return
|
return
|
||||||
_send_pending = true
|
_send_pending = true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue