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 1313import com .facebook .react .bridge .ReadableMap ;
1414import com .facebook .react .bridge .ReactContext ;
1515import com .facebook .react .bridge .WritableArray ;
16+ import com .facebook .react .bridge .WritableNativeArray ;
1617import com .facebook .react .modules .core .DeviceEventManagerModule ;
1718
1819import com .facebook .react .bridge .ReadableType ;
@@ -82,8 +83,12 @@ public static WritableMap dataSnapshotToMap(
8283 data .putString ("value" , null );
8384 }
8485 } 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+ }
8792 }
8893
8994 // Child keys
You can’t perform that action at this time.
0 commit comments