Skip to content

Commit 7a8cd2a

Browse files
committed
fix bug where using an ID for selecting the dropzone element would make the lib crash. fix #12
1 parent e97ee59 commit 7a8cd2a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 7.1.4
2+
3+
Fix bug where using an ID for selecting the dropzone element would make the lib crash. fix #12
4+
15
## 7.1.3
26

37
A very small patch release with a fix regarding the `form` attribute of the hidden `input` field. See dropzone/dropzone#2300. PR #11 by @bancer.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@deltablot/dropzone",
3-
"version": "7.1.3",
3+
"version": "7.1.4",
44
"description": "Handles drag and drop of files for you.",
55
"keywords": [
66
"dragndrop",

src/dropzone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,7 @@ Dropzone.options = {};
17171717
// Returns the options for an element or undefined if none available.
17181718
Dropzone.optionsForElement = function (element) {
17191719
// Get the `Dropzone.options.elementId` for this element if it exists
1720-
if (element.getAttribute("id")) {
1720+
if (element.getAttribute("id") && typeof Dropzone.options !== 'undefined') {
17211721
return Dropzone.options[camelize(element.getAttribute("id"))];
17221722
} else {
17231723
return undefined;

0 commit comments

Comments
 (0)