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

Routing module ignores query parameters in links #9

Open
pciarach opened this issue Jul 26, 2022 · 0 comments
Open

Routing module ignores query parameters in links #9

pciarach opened this issue Jul 26, 2022 · 0 comments

Comments

@pciarach
Copy link

In the EpiSpaRouter.tsx you created a navigation component with a global click handler. This handler subscribes to all links (a tags) and based on the URL, it either opens an external page or navigates to the internal page inside SPA.

The issue is that the logic responsible for SPA navigation takes into the account only path part of the URL thus ignoring any query parameters:

// Only act if we remain on the same domain
if (targetUrl.origin === currentUrl.origin) {
    newPath = targetUrl.pathname;
}

Query parameters might come in handy in many scenarios of SPA, so ignoring them seems to be quite of a problem.

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

No branches or pull requests

1 participant