-
Notifications
You must be signed in to change notification settings - Fork 642
chore(history): update to history ^0.14.0 internally #131
Conversation
@@ -88,7 +88,7 @@ export function syncReduxAndRouter(history, store, selectRouterState = SELECT_ST | |||
const unsubscribeHistory = history.listen(location => { | |||
const route = { | |||
path: createPath(location), | |||
state: location.state | |||
state: location.state === null ? undefined : location.state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this because tests failed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @kjbekkelund! yes, the tests were failing due to the way history assigns a null
value to state, so this was the most lightweight way to keep state undefined
internally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, maybe we should change the tests instead? Nice to be consistent with history
, plus the code is simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justingreenberg If it isn't too much work changing the tests, maybe you could take a look when you've got the opportunity? No hurry — remember to relax and enjoy xmas :)
Hi @justingreenberg, thanks for this! Only had a small question, otherwise I think this is good to go. It would be great if you created a DevTools PR too! |
👍 |
hey guys! @kjbekkelund ok so i removed the location.state expression and updated tests to expect state to be let me know if you get around to reviewing, if not enjoy the holidays! 🎅 |
gets library back up to 100% coverage
@justingreenberg Nice, thanks! I'll try to get this tested and merged tomorrow. Great work 💯 |
original discussion #89 i tried to keep changes as minimal as possible since it sounds like there may be a rewrite happening soon
i can also submit a separate PR for devtools now that it's stable if you want