Skip to content

Commit

Permalink
Merge pull request #847 from crynobone/elsewhere-when-available
Browse files Browse the repository at this point in the history
Use $browser given from closure to received scoped selector.
  • Loading branch information
driesvints authored Dec 21, 2020
2 parents 7a6a9e8 + 19a579c commit 513469e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ public function elsewhere($selector, Closure $callback)
public function elsewhereWhenAvailable($selector, Closure $callback)
{
return $this->elsewhere('', function ($browser) use ($selector, $callback) {
$this->whenAvailable($selector, $callback);
$browser->whenAvailable($selector, $callback);
});
}

Expand Down

0 comments on commit 513469e

Please sign in to comment.