Merge pull request #1208 from liasica/master
Fix RangeError: Maximum call stack size exceeded
This commit is contained in:
commit
cb2f02da04
|
@ -147,7 +147,9 @@ public class JavaScriptBridgeJS {
|
|||
" });" +
|
||||
" }," +
|
||||
" arrayBufferToString: function(arrayBuffer) {" +
|
||||
" return String.fromCharCode.apply(String, arrayBuffer);" +
|
||||
" const uint8Array = new Uint8Array(arrayBuffer);" +
|
||||
" const data = uint8Array.reduce(function(acc, i) { return acc += String.fromCharCode.apply(null, [i]); }, '');" +
|
||||
" return data;" +
|
||||
" }," +
|
||||
" isBodyFormData: function(bodyString) {" +
|
||||
" return bodyString.indexOf('------WebKitFormBoundary') >= 0;" +
|
||||
|
|
|
@ -175,7 +175,9 @@ let UTIL_JS_SOURCE = """
|
|||
});
|
||||
},
|
||||
arrayBufferToString: function(arrayBuffer) {
|
||||
return String.fromCharCode.apply(String, arrayBuffer);
|
||||
const uint8Array = new Uint8Array(arrayBuffer);
|
||||
const data = uint8Array.reduce(function(acc, i) { return acc += String.fromCharCode.apply(null, [i]); }, '');
|
||||
return data;
|
||||
},
|
||||
isBodyFormData: function(bodyString) {
|
||||
return bodyString.indexOf('------WebKitFormBoundary') >= 0;
|
||||
|
|
Loading…
Reference in New Issue