Revert to original target if new target is null

This commit is contained in:
Danny van der Sluijs
2020-09-29 21:51:28 +02:00
parent 4f677a6cc2
commit a493db1873

View File

@ -30,7 +30,7 @@ final class HigherOrderMessageCollection
public function chain(object $target): void
{
foreach ($this->messages as $message) {
$target = $message->call($target);
$target = $message->call($target) ?? $target;
}
}