Skip to content

Commit

Permalink
Updating the context with an 'undef' value removes the parameter from…
Browse files Browse the repository at this point in the history
… the context
  • Loading branch information
ehuelsmann committed Aug 6, 2023
1 parent bead05e commit 42241de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Workflow/Base.pm
Expand Up @@ -38,7 +38,12 @@ sub param {

if ( ref $name eq 'HASH' ) {
foreach my $param_name ( keys %{$name} ) {
$self->{PARAMS}{$param_name} = $name->{$param_name};
if (defined $name->{$param_name}) {
$self->{PARAMS}{$param_name} = $name->{$param_name};
}
else {
delete $self->{PARAMS}->{$param_name};
}
}
return { %{ $self->{PARAMS} } };
}
Expand Down

0 comments on commit 42241de

Please sign in to comment.