Skip to content

Commit

Permalink
Handle null values in CodePushUtils.java (#2707)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailSuendukov authored Jun 19, 2024
1 parent d093b33 commit 7ef2e76
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public static WritableMap convertJsonObjectToWritable(JSONObject jsonObj) {
String key = it.next();
Object obj = null;
try {
obj = jsonObj.get(key);
if (!jsonObj.isNull(key)) {
obj = jsonObj.get(key);
}
} catch (JSONException jsonException) {
// Should not happen.
throw new CodePushUnknownException("Key " + key + " should exist in " + jsonObj.toString() + ".", jsonException);
Expand Down

0 comments on commit 7ef2e76

Please sign in to comment.