mirror of
https://github.com/plausible/analytics.git
synced 2024-11-26 23:27:54 +03:00
Fix QueryLink not linking to the correct URL format
This caused the href view in browsers to show the incorrect URL, and also broke stuff like opening the link in a new tab
This commit is contained in:
parent
7f1f3a00ec
commit
f95f310eb7
@ -82,7 +82,11 @@ class QueryLink extends React.Component {
|
||||
|
||||
render() {
|
||||
const { history, query, to, ...props } = this.props
|
||||
return <Link {...props} to={generateQueryString(to)} onClick={this.onClick} />
|
||||
return <Link
|
||||
{...props}
|
||||
to={{ pathname: window.location.pathname, search: generateQueryString(to) }}
|
||||
onClick={this.onClick}
|
||||
/>
|
||||
}
|
||||
}
|
||||
const QueryLinkWithRouter = withRouter(QueryLink)
|
||||
|
Loading…
Reference in New Issue
Block a user