Skip to content

Commit 0332cb1

Browse files
author
lemon
committed
更改对js调用Java代码的入参的调整,如果是不合法的参数则在Java端接收到的为空串
1 parent 9894bc2 commit 0332cb1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

easybridge/src/main/assets/easybridge.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@
2424
callbackArray[callbackId] = callback;
2525
}
2626

27-
var parameters;
28-
if (typeof args == 'string') {
29-
parameters = args;
30-
} else {
31-
parameters = args || {};
27+
var parameters = args || "";
28+
if (typeof parameters == 'object') {
3229
parameters = JSON.stringify(parameters);
3330
}
3431
//the name '_easybridge' is an java object that mapping to a javascript object,using addJavaInterface in Java code

0 commit comments

Comments
 (0)