to fix #246 FirestoreTask needed to be updated:
task_finished signal always returned a document, even if the task was not successful. This caused Godot to crash if the result of yield(task, "task_finished") was typed to var result : FirestoreDocument.
Now task_finished returns the task itself ->
var task : FirestoreTask = yield(task, "task_finished")
- or just -
yield(task, "task_finished")
then you can check if the task was successful or not like so
properties:
FirestoreTask.error -> empty if task was successful, otherwise is a Dictionary
FirestoreTask.data -> data returned by a successful task, otherwise empty (could be Array or Dictionary depending on the task)
FirestoreTask.document -> contains a non-null FirestoreDocument if the task result is a single document
Fixes #246 #247
to fix #246
FirestoreTask
needed to be updated:task_finished
signal always returned a document, even if the task was not successful. This caused Godot to crash if the result ofyield(task, "task_finished")
was typed tovar result : FirestoreDocument
.Now
task_finished
returns the task itself ->then you can check if the task was successful or not like so
properties:
FirestoreTask.error
-> empty if task was successful, otherwise is a DictionaryFirestoreTask.data
-> data returned by a successful task, otherwise empty (could be Array or Dictionary depending on the task)FirestoreTask.document
-> contains a non-nullFirestoreDocument
if the task result is a single document