mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-02 21:03:02 +08:00
CB-11880 android: Fail-safe for cordova.exec()
- added preliminary sanity check on args variable - replication of iosExec() behaviour - allows to call cordova.exec() without args variable This closes #334
This commit is contained in:
parent
b2d7124424
commit
f838db4e18
3
cordova-js-src/exec.js
vendored
3
cordova-js-src/exec.js
vendored
@ -78,6 +78,9 @@ function androidExec(success, fail, service, action, args) {
|
||||
androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
|
||||
}
|
||||
|
||||
// If args is not provided, default to an empty array
|
||||
args = args || [];
|
||||
|
||||
// Process any ArrayBuffers in the args into a string.
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
if (utils.typeName(args[i]) == 'ArrayBuffer') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user