-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw instead of silently failing with history v3 #3571
Conversation
Curses, why did I release history v2.5.0 before writing this? |
There are more duck-type-y ways to make this check, like failing in the transition manager if |
Does history 2.5.0 cause the same bug as 3.x? |
There is no history 2.5.0. |
Push a 2.5.1 :) |
@@ -91,6 +98,13 @@ const Router = React.createClass({ | |||
let { history } = this.props | |||
const { routes, children } = this.props | |||
|
|||
invariant( | |||
!isUnsupportedHistory(history), | |||
'You have provided a history object from created with history v3.x. ' + |
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.
"from created with", is that a typo?
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.
Good catch!
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.
):
I'll release this tomorrow... about to call it a night and probably should be around in case this breaks people. |
No description provided.