Skip to content

Commit

Permalink
early return if false
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchray committed Apr 27, 2024
1 parent 8913c1d commit 52d52ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Module/Util/Environment.php
Expand Up @@ -257,6 +257,11 @@ public function isDevJS(string $entry): bool
{
// the default vite port is hardcoded for simplicity
$handle = curl_init('http://localhost:5173/' . $entry);

if ($handle === false) {
return false;
}

curl_setopt_array($handle, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_NOBODY => true,
Expand Down

0 comments on commit 52d52ea

Please sign in to comment.