Skip to content
This repository was archived by the owner on Dec 15, 2018. It is now read-only.

Conversation

@tptee
Copy link
Contributor

@tptee tptee commented Jul 26, 2016

history.createHref() adds duplicate basenames to the href (remix-run/history#169). This solves that.

When matching routes, we matched against url instead of pathname, which ended up forcing you to hard-code basenames in your routes. This fixes that too!

…pathname instead of the url to avoid hardcoded base names
@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage increased (+0.07%) to 91.129% when pulling 19cca9c on bug/twofer into a260a76 on master.

const LEFT_MOUSE_BUTTON = 0;

const normalizeHref = location =>
`${location.basename || ''}${location.pathname}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we validate basename to ensure it includes a / char?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 95.2345% sure history does this under the hood when you call history.createLocation()

@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage increased (+0.07%) to 91.129% when pulling c06826d on bug/twofer into a260a76 on master.

@divmain
Copy link
Contributor

divmain commented Jul 26, 2016

LGTM!

@tptee tptee merged commit 6cce630 into master Jul 26, 2016
@tptee tptee deleted the bug/twofer branch July 26, 2016 02:46
adamshone pushed a commit to adamshone/redux-little-router that referenced this pull request Oct 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants