react-dropzone
Advanced tools
Comparing version 8.0.2 to 8.0.3
@@ -51,3 +51,3 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
// https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file | ||
return Array.prototype.every.call(evt.dataTransfer.types, function (type) { | ||
return Array.prototype.some.call(evt.dataTransfer.types, function (type) { | ||
return type === 'Files' || type === 'application/x-moz-file'; | ||
@@ -54,0 +54,0 @@ }); |
@@ -151,3 +151,3 @@ { | ||
}, | ||
"version": "8.0.2", | ||
"version": "8.0.3", | ||
"engines": { | ||
@@ -154,0 +154,0 @@ "node": ">= 6" |
@@ -50,3 +50,3 @@ import accepts from 'attr-accept' | ||
// https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file | ||
return Array.prototype.every.call( | ||
return Array.prototype.some.call( | ||
evt.dataTransfer.types, | ||
@@ -53,0 +53,0 @@ type => type === 'Files' || type === 'application/x-moz-file' |
@@ -153,8 +153,10 @@ import { | ||
expect(isDragDataWithFiles({ dataTransfer: { types: ['text/html'] } })).toBe(false) | ||
expect(isDragDataWithFiles({ dataTransfer: { types: ['Files', 'text/html'] } })).toBe(false) | ||
expect(isDragDataWithFiles({ dataTransfer: { types: ['Files', 'application/test'] } })).toBe( | ||
true | ||
) | ||
expect( | ||
isDragDataWithFiles({ | ||
dataTransfer: { types: ['application/x-moz-file', 'text/html'] } | ||
dataTransfer: { types: ['application/x-moz-file', 'application/test'] } | ||
}) | ||
).toBe(false) | ||
).toBe(true) | ||
}) | ||
@@ -161,0 +163,0 @@ |
Sorry, the diff of this file is too big to display
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
247144
4056