Skip to content

Commit

Permalink
[fix] correctly strip data suffix at root page (#7445)
Browse files Browse the repository at this point in the history
Fixes #7434
  • Loading branch information
dummdidumm authored Oct 31, 2022
1 parent e141513 commit ebfc050
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tender-kiwis-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

[fix] correctly strip data suffix at root page
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function respond(request, options, state) {
}

const is_data_request = has_data_suffix(decoded);
if (is_data_request) decoded = strip_data_suffix(decoded);
if (is_data_request) decoded = strip_data_suffix(decoded) || '/';

if (!state.prerendering?.fallback) {
const matchers = await options.manifest._.matchers();
Expand Down

0 comments on commit ebfc050

Please sign in to comment.