Skip to content

Commit

Permalink
Handle null values in CodePushUtils.java
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailSuendukov committed Jun 10, 2024
1 parent d093b33 commit 009d2dc
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 009d2dc

Please sign in to comment.