Skip to content

fix hx-location to handle replace#3741

Merged
1cg merged 1 commit intobigskysoftware:devfrom
MichaelWest22:hx-location-replace
Apr 15, 2026
Merged

fix hx-location to handle replace#3741
1cg merged 1 commit intobigskysoftware:devfrom
MichaelWest22:hx-location-replace

Conversation

@MichaelWest22
Copy link
Copy Markdown
Collaborator

Description

With HX-Location you can disable the default push = 'true' it does with false but there is currently no way to enable the replace option I added documentation for earlier. While you can set push to 'false' this is still truthy and this blocks it picking up replace option. You can try using the boolean false but this just gets overwritten by 'true' right now.

So to fix this just need to use ?? instead of || so boolean false will prevent the 'true'. And also improve handling of 'false' by setting it to null so it won't block replace applying.

Corresponding issue:

Testing

Added a couple of tests for setting push to false and 'false' and setting replace.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@1cg
Copy link
Copy Markdown
Contributor

1cg commented Apr 15, 2026

Thank you!

@1cg 1cg merged commit a706897 into bigskysoftware:dev Apr 15, 2026
1 check passed
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