forked from github/cordova-android
[CB-3040] length is 1-based, but index is 0-based, can't use == in comparison
This commit is contained in:
parent
27cd9dde38
commit
2d4d18fd75
@ -685,7 +685,7 @@ public class FileTransfer extends CordovaPlugin {
|
|||||||
*/
|
*/
|
||||||
private static String getArgument(JSONArray args, int position, String defaultString) {
|
private static String getArgument(JSONArray args, int position, String defaultString) {
|
||||||
String arg = defaultString;
|
String arg = defaultString;
|
||||||
if (args.length() >= position) {
|
if (args.length() > position) {
|
||||||
arg = args.optString(position);
|
arg = args.optString(position);
|
||||||
if (arg == null || "null".equals(arg)) {
|
if (arg == null || "null".equals(arg)) {
|
||||||
arg = defaultString;
|
arg = defaultString;
|
||||||
|
Loading…
Reference in New Issue
Block a user