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 empty root URL with absolute: false #667

Merged
merged 3 commits into from
Sep 15, 2023
Merged

Conversation

bakerkretzmar
Copy link
Collaborator

Fixes #666. Wanted to use a Regex lookbehind but support for them was only added to Safari several months ago and that's cutting it a bit close I think. That being said, the strings Ziggy works with are so short that we probably don't need to worry about performance at all, so we could probably lean on advanced Regex functionality more...

@bakerkretzmar bakerkretzmar merged commit cd1ebc7 into main Sep 15, 2023
@bakerkretzmar bakerkretzmar deleted the jbk/root-url-fix branch September 15, 2023 18:27
@Tofandel
Copy link
Contributor

Tofandel commented Oct 4, 2023

@bakerkretzmar I think instead of the lookbehind you could have just applied the regex only to this.definition.uri

@bakerkretzmar
Copy link
Collaborator Author

Hmm yeah that's true, although that'll leave a trailing slash on a 'home' route with no path, if there is one.

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.

Route / doesn't work with absolute=false
2 participants