Skip to content

Commit

Permalink
[BUGFIX] avoid duplicate random clone ids
Browse files Browse the repository at this point in the history
- increased the Math.random multiplier
  • Loading branch information
Martin Terber committed Oct 15, 2021
1 parent 386ca64 commit 9c07c58
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 9c07c58

Please sign in to comment.