Skip to content

Commit 4d1d2b3

Browse files
If the "maxFiles" keyword is missing, assign a default value of 5 to align with the documentation. (#2148)
* Fix the issure in Android where the photo picker does not support a maxFiles selection limit. * Fix the error in the setConfiguration function when retrieving maxFiles from options. If the maxFiles keyword is missing, assign a default value of 5 to align with the documentation. --------- Co-authored-by: BruceWang <[email protected]>
1 parent 90e606e commit 4d1d2b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private void setConfiguration(final ReadableMap options) {
137137
includeExif = options.hasKey("includeExif") && options.getBoolean("includeExif");
138138
width = options.hasKey("width") ? options.getInt("width") : 0;
139139
height = options.hasKey("height") ? options.getInt("height") : 0;
140-
maxFiles = options.hasKey("maxFiles") ? options.getInt("maxFiles") : 0;
140+
maxFiles = options.hasKey("maxFiles") ? options.getInt("maxFiles") : maxFiles;
141141
cropping = options.hasKey("cropping") && options.getBoolean("cropping");
142142
cropperActiveWidgetColor = options.hasKey("cropperActiveWidgetColor") ? options.getString("cropperActiveWidgetColor") : null;
143143
cropperStatusBarColor = options.hasKey("cropperStatusBarColor") ? options.getString("cropperStatusBarColor") : null;

0 commit comments

Comments
 (0)