File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
android/src/main/java/io/fullstack/firestack Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 13
13
import com .facebook .react .bridge .ReadableMap ;
14
14
import com .facebook .react .bridge .ReactContext ;
15
15
import com .facebook .react .bridge .WritableArray ;
16
+ import com .facebook .react .bridge .WritableNativeArray ;
16
17
import com .facebook .react .modules .core .DeviceEventManagerModule ;
17
18
18
19
import com .facebook .react .bridge .ReadableType ;
@@ -82,8 +83,12 @@ public static WritableMap dataSnapshotToMap(
82
83
data .putString ("value" , null );
83
84
}
84
85
} else {
85
- WritableMap valueMap = Utils .castSnapshotValue (dataSnapshot );
86
- data .putMap ("value" , valueMap );
86
+ Object value = Utils .castSnapshotValue (dataSnapshot );
87
+ if (value instanceof WritableNativeArray ) {
88
+ data .putArray ("value" , (WritableArray ) value );
89
+ } else {
90
+ data .putMap ("value" , (WritableMap ) value );
91
+ }
87
92
}
88
93
89
94
// Child keys
You can’t perform that action at this time.
0 commit comments