Skip to content
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: update link to fragment for same url #75

Merged
merged 4 commits into from
May 21, 2024

Conversation

hirasso
Copy link
Member

@hirasso hirasso commented May 21, 2024

Description

Besides a warning if the URL of a fragment targeted by a a[data-swup-link-to-fragment] would already match the current url, that URL was also not being applied to the link. I see no reason why it shouldn't do so anyways. I currently have a more complex project where I needed this.

Drive-By

  • extend FragmentElement from HTMLElement instead of Element

Checks

  • The PR is submitted to the master branch
  • The code was linted before pushing (npm run lint)
  • All tests are passing (npm run test)

Copy link

Playwright test results

passed  12 passed

Details

stats  12 tests across 1 suite
duration  
commit  1c5101e

@hirasso hirasso requested a review from daun May 21, 2024 09:05
Copy link
Member

@daun daun left a comment

Choose a reason for hiding this comment

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

Makes sense 🥬

@hirasso hirasso merged commit 5d0b003 into master May 21, 2024
3 checks passed
@hirasso hirasso deleted the fix/update-link-to-fragment-for-same-url branch May 21, 2024 15:03
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