diff --git a/lib/RevBank/Cart/Entry.pm b/lib/RevBank/Cart/Entry.pm index ef8950c..5ed1fe7 100644 --- a/lib/RevBank/Cart/Entry.pm +++ b/lib/RevBank/Cart/Entry.pm @@ -41,7 +41,10 @@ sub add_contra { sub has_attribute { my ($self, $key) = @_; - return exists $self->{attributes}->{$key}; + return ( + exists $self->{attributes}->{$key} + and defined $self->{attributes}->{$key} + ); } sub attribute {