Skip to content

Commit 78db57d

Browse files
Merge pull request #417 from theSlyest/fix_request_with_empty_fields_list
Fix Request with empty list of fields crash bug
2 parents fa306a5 + ea1276e commit 78db57d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

addons/godot-firebase/firestore/firestore_document.gd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ signal changed(changes)
2121
func _init(doc : Dictionary = {}):
2222
_transforms = FieldTransformArray.new()
2323

24-
document = doc.fields
24+
if doc.has("fields"):
25+
document = doc.fields
2526
doc_name = doc.name
2627
if doc_name.count("/") > 2:
2728
doc_name = (doc_name.split("/") as Array).back()

0 commit comments

Comments
 (0)