-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't pass URL from server #3942
Conversation
🦋 Changeset detectedLatest commit: 25430e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@Rich-Harris it looks like the tests are failing with this PR |
the |
Why is this adding |
Co-authored-by: Ignatius Bagus <ignatius.mbs@gmail.com>
Yeah, it allows I'd quite like to get rid of the
kit/packages/kit/src/runtime/server/page/render.js Lines 332 to 339 in 22a5e40
|
I think this also fixes #1511. Rock on! |
The reasons for the previous way of doing things are somewhat cloudy — something to do with ensuring that we use the same route in the client as we do on the server, and with the same
params
, even if the page is prerendered and deployed somewhere that it doesn't expect to be.But since those things are passed along separately, I think it's preferable to set the URL based on
window.location
— this means client-side access tosearch
andhash
(without weird hacks), and is arguably more correct, even if there is a risk of inconsistency in edge cases.This will allow us to close #3650 and #3680.
No tests because it's a bit of an awkward thing to test for.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0