Skip to content

Commit

Permalink
Fix randomization of values with labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
drgrice1 committed Dec 11, 2024
1 parent 3e7e2b8 commit 9395ed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions macros/parsers/parserPopUp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ sub addLabelsValues {
my $self = shift;
my $choices = $self->{orderedChoices};
my $labels = [];
my $values = $self->{values};
my $values = [];
my $n = $self->{n};

foreach my $i (0 .. $n - 1) {
Expand All @@ -278,7 +278,7 @@ sub addLabelsValues {
$values->[$i] = $choices->[$i]{ $labels->[$i] };
} else {
$labels->[$i] = $choices->[$i];
$values->[$i] = $choices->[$i] unless (defined($values->[$i]) && $values->[$i] ne '');
$values->[$i] = $self->{values}[ $self->{order}[$i] ] // $choices->[$i];
}

}
Expand Down

0 comments on commit 9395ed9

Please sign in to comment.