From 2bffaa358ba4d536c7aa18267ffb2c3445c163cd Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Thu, 19 Mar 2020 17:14:56 +0100 Subject: [PATCH] feat(android): make JSObject.getString return null instead of 'null' string --- android/capacitor/src/main/java/com/getcapacitor/JSObject.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/capacitor/src/main/java/com/getcapacitor/JSObject.java b/android/capacitor/src/main/java/com/getcapacitor/JSObject.java index b7f425f56..1a765f667 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/JSObject.java +++ b/android/capacitor/src/main/java/com/getcapacitor/JSObject.java @@ -46,7 +46,7 @@ public String getString(String key) { public String getString(String key, String defaultValue) { try { String value = super.getString(key); - if (value != null) { + if (!super.isNull(key) && value != null) { return value; } } catch (JSONException ex) {