Commit ead1be9e authored by AndreyMaximov's avatar AndreyMaximov Committed by Primsi
Browse files

Issue #2760175 by AndreyMaximov, danylevskyi, podarok, Primsi: Uncaught Error:...

Issue #2760175 by AndreyMaximov, danylevskyi, podarok, Primsi: Uncaught Error: Dropzone already attached
parent 31b62d40
......@@ -24,6 +24,9 @@
addRemoveLinks: true
};
var instanceConfig = drupalSettings.dropzonejs.instances[selector.attr('id')];
if (instanceConfig.instance !== undefined) {
instanceConfig.instance.destroy();
}
var dropzoneInstance = new Dropzone("#" + selector.attr("id"), $.extend({}, instanceConfig, config));
// Other modules might need instances.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment