Skip to content

Conversation

@Conduitry
Copy link
Member

Fixes #4430. The special handling for 404s in SPA mode was erroneously kicking in when we were linking to the same path on a different origin. This resulting in SvelteKit trying to do client-side navigation, which failed when the history API refused to pushstate a URL with a different origin.

I didn't add a test, and may not have time to today. If someone else wants to write one and push to this branch, feel free.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Mar 23, 2022

🦋 Changeset detected

Latest commit: 53d77e6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benmccann benmccann merged commit c040255 into sveltejs:master Mar 23, 2022
@Conduitry Conduitry deleted the gh-4430 branch March 23, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Different-origin link to same path incorrectly getting handled by client-side router

2 participants