iglooform 2.4.31 → 2.4.32
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.
package/es/upload-photo/index.js
CHANGED
|
@@ -234,10 +234,10 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
useEffect(function () {
|
|
237
|
-
if (Array.isArray(value) && files.length === 0) {
|
|
237
|
+
if (Array.isArray(value) && value.length && files.length === 0) {
|
|
238
238
|
mapFilesFromValue(value);
|
|
239
239
|
}
|
|
240
|
-
}, [value
|
|
240
|
+
}, [value]);
|
|
241
241
|
var uploadId = useMemo(function () {
|
|
242
242
|
return "igloo-upload-photo-input-".concat(Math.random());
|
|
243
243
|
}, []);
|
|
@@ -267,10 +267,10 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
267
267
|
};
|
|
268
268
|
|
|
269
269
|
(0, _react.useEffect)(function () {
|
|
270
|
-
if (Array.isArray(value) && files.length === 0) {
|
|
270
|
+
if (Array.isArray(value) && value.length && files.length === 0) {
|
|
271
271
|
mapFilesFromValue(value);
|
|
272
272
|
}
|
|
273
|
-
}, [value
|
|
273
|
+
}, [value]);
|
|
274
274
|
var uploadId = (0, _react.useMemo)(function () {
|
|
275
275
|
return "igloo-upload-photo-input-".concat(Math.random());
|
|
276
276
|
}, []);
|