@connectedbits/react-native-image-picker 2.4.14-android-legacy → 2.4.15-android-legacy

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -699,23 +699,27 @@ public class ImagePickerModule extends ReactContextBaseJavaModule
699
699
 
700
700
  private void parseOptions(final ReadableMap options) {
701
701
  noData = false;
702
+ pickVideo = false;
703
+ pickBoth = false;
704
+ videoQuality = 1;
705
+ videoDurationLimit = 0;
706
+ if(options == null){
707
+ return;
708
+ }
709
+
702
710
  if (options.hasKey("noData")) {
703
711
  noData = options.getBoolean("noData");
704
712
  }
705
713
  imageConfig = imageConfig.updateFromOptions(options);
706
- pickVideo = false;
707
- pickBoth = false;
708
714
  if (options.hasKey("mediaType") && options.getString("mediaType").equals("mixed")) {
709
715
  pickBoth = true;
710
716
  }
711
717
  if (options.hasKey("mediaType") && options.getString("mediaType").equals("video")) {
712
718
  pickVideo = true;
713
719
  }
714
- videoQuality = 1;
715
720
  if (options.hasKey("videoQuality") && options.getString("videoQuality").equals("low")) {
716
721
  videoQuality = 0;
717
722
  }
718
- videoDurationLimit = 0;
719
723
  if (options.hasKey("durationLimit")) {
720
724
  videoDurationLimit = options.getInt("durationLimit");
721
725
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedbits/react-native-image-picker",
3
- "version": "2.4.14-android-legacy",
3
+ "version": "2.4.15-android-legacy",
4
4
  "description": "A React Native module that allows you to use native UI to select media from the device library or directly from the camera",
5
5
  "react-native": "src/index.ts",
6
6
  "types": "lib/typescript/index.d.ts",