Skip to content

Commit e0e3d32

Browse files
committed
Move propTypes
1 parent 26bed74 commit e0e3d32

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

modules/Router.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ var { arrayOf, func, object, instanceOf } = React.PropTypes;
1313

1414
var RoutingContextMixin = {
1515

16+
propTypes: {
17+
stringifyQuery: func.isRequired
18+
},
19+
20+
getDefaultProps() {
21+
return {
22+
stringifyQuery
23+
};
24+
},
25+
1626
childContextTypes: {
1727
router: object.isRequired
1828
},
@@ -198,7 +208,6 @@ export var Router = React.createClass({
198208

199209
propTypes: {
200210
createElement: func.isRequired,
201-
stringifyQuery: func.isRequired,
202211
onError: func.isRequired,
203212
onUpdate: func,
204213

@@ -218,7 +227,6 @@ export var Router = React.createClass({
218227
getDefaultProps() {
219228
return {
220229
createElement,
221-
stringifyQuery,
222230
onError: function (error) {
223231
// Throw errors by default so we don't silently swallow them!
224232
throw error; // This error probably originated in getChildRoutes or getComponents.

0 commit comments

Comments
 (0)