File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -57,24 +57,13 @@ static func from_firebase_type(value : Variant) -> Variant:
57
57
return null
58
58
59
59
if value .has ("mapValue" ):
60
- value = _from_firebase_type_recursive (value .values ()[0 ]. fields )
60
+ value = fields2dict (value .values ()[0 ])
61
61
elif value .has ("timestampValue" ):
62
62
value = Time .get_datetime_dict_from_datetime_string (value .values ()[0 ], false )
63
63
else :
64
64
value = value .values ()[0 ]
65
65
66
66
return value
67
-
68
- static func _from_firebase_type_recursive (value : Variant ) -> Variant :
69
- if value == null :
70
- return null
71
-
72
- if value .has ("mapValue" ) or value .has ("timestampValue" ):
73
- value = _from_firebase_type_recursive (value .value ()[0 ].fields )
74
- else :
75
- value = value .values ()[0 ]
76
-
77
- return value
78
67
79
68
static func to_firebase_type (value : Variant ) -> Dictionary :
80
69
var var_type : String = ""
@@ -103,7 +92,7 @@ static func fields2dict(doc) -> Dictionary:
103
92
var dict = {}
104
93
if doc .has ("fields" ):
105
94
var fields = doc ["fields" ]
106
- print ( fields )
95
+
107
96
for field in fields .keys ():
108
97
if fields [field ].has ("mapValue" ):
109
98
dict [field ] = (fields2dict (fields [field ].mapValue ))
You can’t perform that action at this time.
0 commit comments