@bbki.ng/components 1.5.10 → 1.5.11
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/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -493,6 +493,9 @@ var useDropImage = (params) => {
|
|
|
493
493
|
ev.preventDefault();
|
|
494
494
|
setIsDragOver(false);
|
|
495
495
|
const file = ev.dataTransfer.files[0];
|
|
496
|
+
if (!file || !file.type.startsWith("image")) {
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
496
499
|
imageFile.current = file;
|
|
497
500
|
setPreviewImageSrcByFile(file);
|
|
498
501
|
onDrop(ev, file);
|
package/dist/index.mjs
CHANGED
|
@@ -442,6 +442,9 @@ var useDropImage = (params) => {
|
|
|
442
442
|
ev.preventDefault();
|
|
443
443
|
setIsDragOver(false);
|
|
444
444
|
const file = ev.dataTransfer.files[0];
|
|
445
|
+
if (!file || !file.type.startsWith("image")) {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
445
448
|
imageFile.current = file;
|
|
446
449
|
setPreviewImageSrcByFile(file);
|
|
447
450
|
onDrop(ev, file);
|