-
-
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
fix: do not mutate URL during reroute logic #13222
Conversation
🦋 Changeset detectedLatest commit: daf8475 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 |
|
||
await page.goto('/'); | ||
|
||
await page.locator('a[href="/#/reroute-b"]').click(); | ||
await expect(page.locator('p')).toHaveText('rerouted'); | ||
url = new URL(page.url()); | ||
expect(url.hash).toBe('#/rerouted'); | ||
expect(url.hash).toBe('#/reroute-b'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turns out there even was a test that could've caught this, but the test assertion was wrong. The reroute hooks does neither influence page.url
nor the browser url.
preview: https://svelte-dev-git-preview-kit-13222-svelte.vercel.app/ this is an automated message |
Thanks for fixing the bug so quickly @dummdidumm. Enjoy the holidays! |
fixes #13220
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
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.