Closed agirton-twitter closed 8 years ago
@agirton-twitter there is some problem with merging this correctly. I´m looking into it... Thanks for the PR though!
@agirton-twitter It would be nice, if you could update your branch. This should resolve the merge issue.
@Scarysize I've rebased on top of the latest master. Re-ran tests to ensure all pass. Last I checked Travis was failing but that was because it said it couldn't find the history/lib/useBaseName module.
@agirton Nice one. Just checked the tests locally, everything passes. Thank you!
When using
history
basename function it returns an object. Before this it would only accept a function that returns an object. This update gives users the ability to use other helpers provided by history.Also update to the tests to account for this new behavior. Most of the tests were kept in this describe block to ensure all other routes stayed the same and that history properly uses the basename for determining root.
One other piece I would like to note is that similar logic also lives in useDefaults. I considered creating an abstraction for both of these instances, but rather not create the wrong one and have to create edge cases for both down the line.
This would fix issue #158