Skip to content

Link to "/" with basename adds extra trailing slash  #6226

@mmalha

Description

@mmalha

Version

4.2.0

Test Case

https://codesandbox.io/s/6llwm7m8zz

Steps to reproduce

<BrowserRouter basename="/foo/bar"> <Route path="/" component={App}/> </BrowserRouter> 
<Link to="/" /> 

Expected vs. Actual Behavior

the link takes me to http://host/foo/bar/ (with trailing slash) when I expect http://host/foo/bar (without trailing slash)

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