File tree 1 file changed +6
-1
lines changed
android/src/main/java/io/fullstack/firestack
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 20
20
import com .facebook .react .bridge .ReadableType ;
21
21
import com .google .firebase .database .DataSnapshot ;
22
22
23
+ @ SuppressWarnings ("WeakerAccess" )
23
24
public class FirestackUtils {
24
25
private static final String TAG = "FirestackUtils" ;
25
26
@@ -168,8 +169,12 @@ public static WritableArray getChildKeys(DataSnapshot snapshot) {
168
169
}
169
170
170
171
public static Map <String , Object > recursivelyDeconstructReadableMap (ReadableMap readableMap ) {
171
- ReadableMapKeySetIterator iterator = readableMap .keySetIterator ();
172
172
Map <String , Object > deconstructedMap = new HashMap <>();
173
+ if (readableMap == null ) {
174
+ return deconstructedMap ;
175
+ }
176
+
177
+ ReadableMapKeySetIterator iterator = readableMap .keySetIterator ();
173
178
while (iterator .hasNextKey ()) {
174
179
String key = iterator .nextKey ();
175
180
ReadableType type = readableMap .getType (key );
You can’t perform that action at this time.
0 commit comments