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.
@@ -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, files]);
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, files]);
273
+ }, [value]);
274
274
  var uploadId = (0, _react.useMemo)(function () {
275
275
  return "igloo-upload-photo-input-".concat(Math.random());
276
276
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iglooform",
3
- "version": "2.4.31",
3
+ "version": "2.4.32",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "build-dev": "dumi build",