mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 10:17:23 +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
|
public function chain(object $target): void
|
||||||
{
|
{
|
||||||
foreach ($this->messages as $message) {
|
foreach ($this->messages as $message) {
|
||||||
$target = $message->call($target);
|
$target = $message->call($target) ?? $target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user