Skip to content

Commit

Permalink
[fix] ignore hash links during prerendering (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jan 16, 2022
1 parent 668b0aa commit 3f729ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/grumpy-panthers-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

[fix] ignore hash links during prerendering (again)
2 changes: 1 addition & 1 deletion packages/kit/src/core/adapt/prerender/prerender.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export async function prerender({ cwd, out, log, config, build_data, fallback, a

if (is_html && config.kit.prerender.crawl) {
for (const href of crawl(/** @type {string} */ (rendered.body))) {
if (href.startsWith('data:')) continue;
if (href.startsWith('data:') || href.startsWith('#')) continue;

const resolved = resolve(path, href);
if (!is_root_relative(resolved)) continue;
Expand Down

0 comments on commit 3f729ba

Please sign in to comment.