mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
Revert to original target if new target is null
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user