Skip to content

Commit

Permalink
fix: infinite reinitialization of plupload instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Jun 19, 2024
1 parent e4e12e9 commit 2f883cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ function ppom_reset_cropping_preview(file_name) {
// Attach FILE API with DOM
function ppom_setup_file_upload_input(file_input) {

var file_data_name = file_input.data_name;
const file_data_name = file_input.data_name;
if ( plupload_instances[file_data_name] !== undefined ) {
return;
}

file_count[file_data_name] = 0;
$filelist_DIV[file_data_name] = jQuery('#filelist-' + file_data_name);
Expand Down

0 comments on commit 2f883cc

Please sign in to comment.