Skip to content

Routing module ignores query parameters in links #9

Open
@pciarach

Description

@pciarach

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions