Skip to content

Commit

Permalink
Fix #1223 - Vite regression introduced on Laravel 9 in v3.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl committed May 22, 2024
1 parent 120b8bc commit 885179b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Vite.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class Vite extends BaseVite // todo move to a different directory in v4
*/
protected function assetPath($path, $secure = null)
{
return $this->assetPathResolver ? ($this->assetPathResolver)($path, $secure) : global_asset($path);
// In Laravel 9, the property doesn't exist.
return (isset($this->assetPathResolver) && $this->assetPathResolver)
? ($this->assetPathResolver)($path, $secure)
: global_asset($path);
}
}

0 comments on commit 885179b

Please sign in to comment.