We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6241af9 commit a05c3f6Copy full SHA for a05c3f6
android/src/main/java/com/ammarahmed/mmkv/RNMMKVModule.java
@@ -134,9 +134,12 @@ public void writeToJSON(MMKV kvv) {
134
Bundle bundle = kvv.decodeParcelable(string, Bundle.class);
135
if (bundle != null) {
136
WritableMap map = Arguments.fromBundle(bundle);
137
- List<Object> subChild = Arguments.toList(map.getArray(string));
138
- String obj = gson.toJson(subChild);
139
- kvv.putString(string, obj);
+ if (map.getArray(string) != null) {
+ List<Object> subChild = Arguments.toList(map.getArray(string));
+ String obj = gson.toJson(subChild);
140
+ kvv.putString(string, obj);
141
+ }
142
+
143
}
144
145
0 commit comments