Skip to content

Commit

Permalink
Merge pull request #417 from theSlyest/fix_request_with_empty_fields_…
Browse files Browse the repository at this point in the history
…list

Fix Request with empty list of fields crash bug
  • Loading branch information
WolfgangSenff authored Jul 18, 2024
2 parents fa306a5 + ea1276e commit 78db57d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/godot-firebase/firestore/firestore_document.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ signal changed(changes)
func _init(doc : Dictionary = {}):
_transforms = FieldTransformArray.new()

document = doc.fields
if doc.has("fields"):
document = doc.fields
doc_name = doc.name
if doc_name.count("/") > 2:
doc_name = (doc_name.split("/") as Array).back()
Expand Down

0 comments on commit 78db57d

Please sign in to comment.