Skip to content

Commit 52069b7

Browse files
authored
feat(android): make JSObject.getString return null instead of 'null' string (#2602)
1 parent b9e25f3 commit 52069b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/capacitor/src/main/java/com/getcapacitor/JSObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public String getString(String key) {
4646
public String getString(String key, String defaultValue) {
4747
try {
4848
String value = super.getString(key);
49-
if (value != null) {
49+
if (!super.isNull(key) && value != null) {
5050
return value;
5151
}
5252
} catch (JSONException ex) {

0 commit comments

Comments
 (0)