Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Oct 8, 2025

The problem is Sveltekit, that loses the hash tags when doing shallow routing.

Issue logged: sveltejs/kit#14648

Since I have no idea if this will be fixed fast enough, this is the workaround.

…to support Sveltekit

The problem is Sveltekit, that loses the hash tags when doing shallow routing.

Issue logged:  sveltejs/kit#14648

Since I have no idea if this will be fixed fast enough, this is the workaround.
@webJose webJose requested a review from Copilot October 8, 2025 22:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a workaround for a SvelteKit issue where hash tags are lost during shallow routing by explicitly handling empty string hrefs in the Link component.

  • Adds conditional logic to use the current URL when href is an empty string
  • Modifies the calcHref derived value to bypass calculateHref function for empty hrefs
  • Provides immediate workaround for SvelteKit hash tag preservation issue

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@webJose webJose merged commit 6aaa31d into main Oct 8, 2025
1 check passed
@webJose webJose deleted the JP/fix branch October 8, 2025 22:54
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.

2 participants