fix: dragon buffering when no dragons in database
This commit is contained in:
parent
f9f38ba95c
commit
98e3b8a1e3
2 changed files with 4 additions and 1 deletions
|
@ -12,6 +12,7 @@ func _ready() -> void:
|
|||
func _on_request_completed(_result: int, response_code: int, _headers: PackedStringArray, body: PackedByteArray):
|
||||
if response_code != 200:
|
||||
print("HTTP request returned error: ", response_code)
|
||||
on_dragon_received.emit(null)
|
||||
return
|
||||
if body.size() != 0:
|
||||
var json = JSON.parse_string(body.get_string_from_utf8())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue