Skip to content

Commit

Permalink
Fix SyntaxError on Vite prefetch with empty assets (laravel#53659)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnoordsij authored Nov 25, 2024
1 parent c2e59b5 commit cee8695
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Vite.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ public function __invoke($entrypoints, $buildDirectory = null)
return link
}
const fragment = new DocumentFragment
const fragment = new DocumentFragment;
{$assets}.forEach((asset) => fragment.append(makeLink(asset)))
document.head.append(fragment)
}))
Expand Down
2 changes: 1 addition & 1 deletion tests/Foundation/FoundationViteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ public function testItCanPrefetchAggressively()
return link
}
const fragment = new DocumentFragment
const fragment = new DocumentFragment;
{$expectedAssets}.forEach((asset) => fragment.append(makeLink(asset)))
document.head.append(fragment)
}))
Expand Down

0 comments on commit cee8695

Please sign in to comment.