Skip to content

Commit

Permalink
shouldn't pass non-existant params
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Dec 19, 2009
1 parent 9bb536e commit 44cbee5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/JSON/RPC/Dispatcher.pm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ sub acquire_procedure_from_hashref {
my $proc = JSON::RPC::Dispatcher::Procedure->new;
$proc->method($hashref->{method});
$proc->id($hashref->{id});
$proc->params($hashref->{params});
$proc->params($hashref->{params}) if exists $hashref->{params};
return $proc;
}

Expand All @@ -198,7 +198,7 @@ sub acquire_procedure_from_get {
$proc->error_data($params->{params});
}
else {
$proc->params($decoded_params);
$proc->params($decoded_params) if defined $decoded_params;
}
return $proc;
}
Expand Down

0 comments on commit 44cbee5

Please sign in to comment.