I am working with Titanium, my code looks like this:
var currentData = new Array(); if(currentData[index]!==\"\"||currentData[index]!==null||currentData[ind
(typeof files[1] === undefined)? this.props.upload({file: files}): this.props.postMultipleUpload({file: files widgetIndex: 0, id})
Check if the second item in the array is undefined using the typeof and checking for undefined
typeof
undefined