Skip to content

Commit

Permalink
Merge pull request #16 from localhorst/master
Browse files Browse the repository at this point in the history
[BUGFIX] Avoid duplicate random clone ids
  • Loading branch information
tritum committed Mar 14, 2023
2 parents 94c8769 + 9c07c58 commit ef23995
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $(document).on('initialize-repeatable-container-copy-buttons', function(event, c
$('[id]', $subject).each(function(e) {
var $element = $(this),
id = $element.attr('id'),
newId = Math.floor(Math.random() * 42) + Date.now();
newId = Math.floor(Math.random() * 99999999) + Date.now();

$element.attr('id', newId);
idReplacements[id] = newId;
Expand Down

0 comments on commit ef23995

Please sign in to comment.