Skip to content

Commit

Permalink
Pass the query as a separate arg.
Browse files Browse the repository at this point in the history
Wait, how did this work before?
  • Loading branch information
timdorr committed Dec 7, 2015
1 parent 918c9fc commit 8193c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const Link = React.createClass({
location = { query, hash, state, ...location }
}

props.href = history.createHref(location)

This comment has been minimized.

Copy link
@taion

taion Dec 7, 2015

Contributor

This was intended to work with remix-run/history#173. Right now the API between createHref/createPath and push/replace is not consistent. I don't know how we want to sequence this - my first choice would be to merge and release remix-run/history#173.

This comment has been minimized.

Copy link
@timdorr

timdorr Dec 7, 2015

Author Member

Agreed. But with the currently published API, we will have to do this for now. Let's not get ahead of ourselves 😄

This comment has been minimized.

Copy link
@taion

taion Dec 7, 2015

Contributor

This won't work if someone passes to={{ pathname: '/foo', query: { the: 'query' } }} though.

This comment has been minimized.

Copy link
@taion

taion Dec 7, 2015

Contributor

Oh, never mind, you're using location.query rather than query. I'm okay with this to get the build green.

props.href = history.createHref(location, location.query)

if (activeClassName || (activeStyle != null && !isEmptyObject(activeStyle))) {
if (history.isActive(to, query, onlyActiveOnIndex)) {
Expand Down

0 comments on commit 8193c37

Please sign in to comment.