react-uploader
Advanced tools
Comparing version 3.9.0 to 3.10.0
@@ -144,20 +144,24 @@ /******/ (function() { // webpackBootstrap | ||
className: className | ||
}; | ||
(0,external_react_namespaceObject.useLayoutEffect)(function () { | ||
if (element !== undefined) { | ||
var onUpdateParams = onUpdate === undefined ? {} : { | ||
onUpdate: onUpdate | ||
}; | ||
uploader.open(Object.assign(Object.assign(Object.assign({}, options), onUpdateParams), { | ||
container: element, | ||
layout: "inline" | ||
})).then(function (files) { | ||
if (onComplete !== undefined) { | ||
onComplete(files); | ||
} | ||
}, function (error) { | ||
return console.error("Uploader error.", error); | ||
}); | ||
} | ||
}, [element]); | ||
}; // Prevent React warning, while keeping rendering synchronous in the browser. | ||
if (typeof window !== "undefined") { | ||
(0,external_react_namespaceObject.useLayoutEffect)(function () { | ||
if (element !== undefined) { | ||
var onUpdateParams = onUpdate === undefined ? {} : { | ||
onUpdate: onUpdate | ||
}; | ||
uploader.open(Object.assign(Object.assign(Object.assign({}, options), onUpdateParams), { | ||
container: element, | ||
layout: "inline" | ||
})).then(function (files) { | ||
if (onComplete !== undefined) { | ||
onComplete(files); | ||
} | ||
}, function (error) { | ||
return console.error("Uploader error.", error); | ||
}); | ||
} | ||
}, [element]); | ||
} | ||
return /*#__PURE__*/external_react_default().createElement("div", Object.assign({}, classNameProp, { | ||
@@ -164,0 +168,0 @@ ref: elementRef, |
{ | ||
"name": "react-uploader", | ||
"version": "3.9.0", | ||
"version": "3.10.0", | ||
"author": "Upload <hello@upload.io> (https://upload.io)", | ||
@@ -77,3 +77,3 @@ "description": "React File Upload UI Widget — Lightweight & supports: drag and drop, multiple uploads, image cropping, customization & more 🚀 Comes with Cloud Storage 🌐", | ||
"dependencies": { | ||
"uploader": "^3.8.0" | ||
"uploader": "^3.9.0" | ||
}, | ||
@@ -80,0 +80,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26869
250
Updateduploader@^3.9.0