Skip to content

Commit 98fe714

Browse files
committed
make router required on context
we used to allow this to make unit tests easier, but now all you have to do is wrap your component in a `<MemoryHistory>` and be on your way closes #3889
1 parent 90d4832 commit 98fe714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/Link.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Link extends React.Component {
2525
}
2626

2727
static contextTypes = {
28-
router: routerContextType
28+
router: routerContextType.isRequired
2929
}
3030

3131
handleClick = (event) => {

0 commit comments

Comments
 (0)