diff options
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r-- | perl-install/interactive.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 684f68179..96313f199 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -227,8 +227,10 @@ sub ask_from_entries_ref($$$$;$%) { if ((ref $_) eq "SCALAR") { { val => $_ } } else { - add2hash_($_, { type => 'list' }) if @{$_->{list}} > 1; #- TODO: remove the if, not needed? - ${$_->{val}} = $_->{list}[0] if $_->{not_edit} && !member(${$_->{val}}, @{$_->{list}}); + if (@{$_->{list} || []} > 1) { + add2hash_($_, { type => 'list' }); + ${$_->{val}} = $_->{list}[0] if $_->{not_edit} && !member(${$_->{val}}, @{$_->{list}}); + } $_; } } @$val ]; |