Skip to content

Commit

Permalink
fix bug where using an ID for selecting the dropzone element would ma…
Browse files Browse the repository at this point in the history
…ke the lib crash. fix #12
  • Loading branch information
NicolasCARPi committed Jul 7, 2024
1 parent e97ee59 commit 7a8cd2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 7.1.4

Fix bug where using an ID for selecting the dropzone element would make the lib crash. fix #12

## 7.1.3

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.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deltablot/dropzone",
"version": "7.1.3",
"version": "7.1.4",
"description": "Handles drag and drop of files for you.",
"keywords": [
"dragndrop",
Expand Down
2 changes: 1 addition & 1 deletion src/dropzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,7 @@ Dropzone.options = {};
// Returns the options for an element or undefined if none available.
Dropzone.optionsForElement = function (element) {
// Get the `Dropzone.options.elementId` for this element if it exists
if (element.getAttribute("id")) {
if (element.getAttribute("id") && typeof Dropzone.options !== 'undefined') {
return Dropzone.options[camelize(element.getAttribute("id"))];
} else {
return undefined;
Expand Down

0 comments on commit 7a8cd2a

Please sign in to comment.