Skip to content

Commit ea1276e

Browse files
committed
fix: check that request result has fields property
1 parent fa306a5 commit ea1276e

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)