mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-01-31 12:02:49 +08:00
Add second check for position values (iOS)
Optional position value is NSNull in arguments array when not included.
This commit is contained in:
parent
243873dda9
commit
f7e792c719
@ -83,7 +83,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
//Opens the file preview
|
//Opens the file preview
|
||||||
CGRect rect;
|
CGRect rect;
|
||||||
if ([command.arguments count] >= 4) {
|
if ([command.arguments count] >= 4
|
||||||
|
&& ![[command.arguments objectAtIndex:3] isEqual: [NSNull null]]) {
|
||||||
NSArray *positionValues = [command.arguments objectAtIndex:3];
|
NSArray *positionValues = [command.arguments objectAtIndex:3];
|
||||||
rect = CGRectMake(0, 0, [[positionValues objectAtIndex:0] floatValue], [[positionValues objectAtIndex:1] floatValue]);
|
rect = CGRectMake(0, 0, [[positionValues objectAtIndex:0] floatValue], [[positionValues objectAtIndex:1] floatValue]);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user