Skip to content
This repository was archived by the owner on Jan 5, 2018. It is now read-only.

Commit c04d725

Browse files
committed
Issue #2679695 by Nikhilesh Gupta: dropzonejs ESLint Errors
1 parent bbca6d6 commit c04d725

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

js/dropzone.integration.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
Drupal.dropzonejsInstances = [];
1313

1414
Drupal.behaviors.dropzonejsIntegraion = {
15-
attach: function(context) {
15+
attach: function (context) {
16+
var Dropzone;
1617
Dropzone.autoDiscover = false;
1718
var selector = $(".dropzone-enable");
1819
selector.addClass("dropzone");
@@ -30,7 +31,7 @@
3031
drupalSettings["dropzonejs"]["instances"][selector.attr("id")]["instance"] = dropzoneInstance;
3132

3233
// React on add file. Add only accepted files.
33-
dropzoneInstance.on("success", function(file, response) {
34+
dropzoneInstance.on("success", function (file, response) {
3435
var uploadedFilesElement = selector.siblings(':hidden');
3536
var currentValue = uploadedFilesElement.attr('value');
3637

@@ -42,15 +43,15 @@
4243
});
4344

4445
// React on file removing.
45-
dropzoneInstance.on("removedfile", function(file) {
46+
dropzoneInstance.on("removedfile", function (file) {
4647
var uploadedFilesElement = selector.siblings(':hidden');
4748
var currentValue = uploadedFilesElement.attr('value');
4849

4950
// Remove the file from the element.
5051
if (currentValue.length) {
5152
var fileNames = currentValue.split(";");
5253
for (var i in fileNames) {
53-
if (fileNames[i] == file.processedName) {
54+
if (fileNames[i] === file.processedName) {
5455
fileNames.splice(i,1);
5556
break;
5657
}

0 commit comments

Comments
 (0)