瀏覽代碼

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

loki.wu 11 月之前
父節點
當前提交
5ef91355d5
共有 1 個文件被更改,包括 3 次插入1 次删除
  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)