瀏覽代碼

Don't parse back button is json is empty

Guy Carmeli 6 年之前
父節點
當前提交
a1b91cd452
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      lib/android/app/src/main/java/com/reactnativenavigation/parse/BackButton.java

+ 1
- 1
lib/android/app/src/main/java/com/reactnativenavigation/parse/BackButton.java 查看文件

@@ -13,7 +13,7 @@ import org.json.JSONObject;
13 13
 public class BackButton extends Button {
14 14
     public static BackButton parse(JSONObject json) {
15 15
         BackButton result = new BackButton();
16
-        if (json == null) return result;
16
+        if (json == null || json.toString().equals("{}")) return result;
17 17
 
18 18
         result.hasValue = true;
19 19
         result.visible = BoolParser.parse(json, "visible");