summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VNDB/Handler/Chars.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/Chars.pm b/lib/VNDB/Handler/Chars.pm
index ab4a5627..afc467d4 100644
--- a/lib/VNDB/Handler/Chars.pm
+++ b/lib/VNDB/Handler/Chars.pm
@@ -339,7 +339,7 @@ sub edit {
$frm->{desc} = $self->bbSubstLinks($frm->{desc});
$frm->{main_spoil} = 0 if !$frm->{main};
- my %traits = map +($_->{id}, 1), @{$self->dbTraitGet(results => 500, state => 2, id => [ map $_->[0], @traits ])};
+ my %traits = @traits ? map +($_->{id}, 1), @{$self->dbTraitGet(results => 500, state => 2, id => [ map $_->[0], @traits ])} : ();
@traits = grep $traits{$_->[0]}, @traits;
# check for changes