File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed
Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public function connectTo(string $url): void
5959
6060 // Add custom launch arguments if configured
6161 $ customArgs = Playwright::getEffectiveLaunchArgs ();
62- if (! empty ( $ customArgs) ) {
62+ if ($ customArgs !== [] ) {
6363 $ launchOptions ['args ' ] = $ customArgs ;
6464 }
6565
Original file line number Diff line number Diff line change @@ -253,12 +253,10 @@ public static function getEffectiveLaunchArgs(): array
253253 $ args = self ::$ launchArgs ;
254254
255255 if (self ::isHeadless ()) {
256- $ args = array_merge ($ args , self ::$ headlessLaunchArgs );
257- } else {
258- $ args = array_merge ($ args , self ::$ headedLaunchArgs );
256+ return array_merge ($ args , self ::$ headlessLaunchArgs );
259257 }
260258
261- return $ args ;
259+ return array_merge ( $ args, self :: $ headedLaunchArgs ) ;
262260 }
263261
264262 /**
Original file line number Diff line number Diff line change 1212
1313 $ reflection = new ReflectionClass (Playwright::class);
1414 $ headlessProperty = $ reflection ->getProperty ('headless ' );
15- $ headlessProperty ->setAccessible (true );
1615 $ headlessProperty ->setValue (null , true );
1716});
1817
You can’t perform that action at this time.
0 commit comments