Skip to content

Commit

Permalink
guard file uploader js to only execute when needed (#1004)
Browse files Browse the repository at this point in the history
Co-authored-by: Shana Moore <shana@scientist.com>
  • Loading branch information
orangewolf and Shana Moore authored Jan 15, 2025
1 parent 105e9ce commit e51d3d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/bulkrax/importers.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// All this logic will automatically be available in application.js.

function prepBulkrax(event) {
if($('form#new_importer').length < 1) {
return true;
}

var refresh_button = $('.refresh-set-source');
var base_url = $('#importer_parser_fields_base_url');
var initial_base_url = base_url.val();
Expand Down

0 comments on commit e51d3d9

Please sign in to comment.