Prechádzať zdrojové kódy

修复可能出现类型转换失败的问题

loki.wu 11 mesiacov pred
rodič
commit
5ef91355d5
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      lib/client_base.dart

+ 3 - 1
lib/client_base.dart

@@ -86,7 +86,9 @@ class JsonRpcClientBase {
 
       var response = await _postRequest(package);
       if (response == null) throw JsonRpcException(message: "Response Empty");
-
+      if (response is String) {
+        response = jsonDecode(response);
+      }
       result = await _handleDecoded(response);
     } catch (e) {
       if (e is FHttpError)