diff --git a/src/Illuminate/Foundation/Vite.php b/src/Illuminate/Foundation/Vite.php index 9c0a24d04f98..30b16e5a03f2 100644 --- a/src/Illuminate/Foundation/Vite.php +++ b/src/Illuminate/Foundation/Vite.php @@ -757,11 +757,7 @@ public function manifestHash($buildDirectory = null) */ protected function chunk($manifest, $file) { - if (! isset($manifest[$file])) { - throw new Exception("Unable to locate file in Vite manifest: {$file}."); - } - - return $manifest[$file]; + return $manifest[$file] ?? throw new Exception("Unable to locate file in Vite manifest: {$file}."); } /**