From 543baa52ebb6ac3a400200dd8227f4e927fabf62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E6=A0=97=E5=AD=90?= Date: Thu, 14 Aug 2025 15:56:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E6=9E=B6?= =?UTF-8?q?=E6=9E=84asMap=E6=96=B9=E6=B3=95=E5=8F=AA=E8=83=BD=E6=B6=88?= =?UTF-8?q?=E8=B4=B9=E4=B8=80=E6=AC=A1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/finogeeks/mop/rnsdk/FINMopSDKModule.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/android/src/main/java/com/finogeeks/mop/rnsdk/FINMopSDKModule.java b/android/src/main/java/com/finogeeks/mop/rnsdk/FINMopSDKModule.java index 141fc78..f7e7438 100644 --- a/android/src/main/java/com/finogeeks/mop/rnsdk/FINMopSDKModule.java +++ b/android/src/main/java/com/finogeeks/mop/rnsdk/FINMopSDKModule.java @@ -918,8 +918,11 @@ public void invoke(String s, JSONObject jsonObject, com.finogeeks.lib.applet.int @Override public void onSuccess(Dynamic o) { String json = null; - if (o != null && o.asMap() != null) { - json = new Gson().toJson(o.asMap().toHashMap()); + if (o != null) { + ReadableMap map = o.asMap(); + if (map != null) { + json = new Gson().toJson(map.toHashMap()); + } } Log.d(TAG, "channel invokeMethod:" + name + " success, result=" + o + ", json=" + json); @@ -1011,8 +1014,11 @@ public void invoke(String s, JSONObject jsonObject, com.finogeeks.lib.applet.int @Override public void onSuccess(Dynamic o) { String json = null; - if (o != null && o.asMap() != null) { - json = new Gson().toJson(o.asMap().toHashMap()); + if (o != null) { + ReadableMap map = o.asMap(); + if (map != null) { + json = new Gson().toJson(map.toHashMap()); + } } Log.d(TAG, "channel invokeMethod:" + name + " success, result=" + o + ", json=" + json);