Skip to content
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

Remove remaining preserveScrollPosition definitions #330

Merged
merged 1 commit into from
Oct 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions modules/components/Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,10 @@ var Route = React.createClass({

propTypes: {
handler: React.PropTypes.any.isRequired,
preserveScrollPosition: React.PropTypes.bool.isRequired,
path: React.PropTypes.string,
name: React.PropTypes.string
},

getDefaultProps: function () {
return {
preserveScrollPosition: false
};
},

render: function () {
throw new Error(
'The <Route> component should not be rendered directly. You may be ' +
Expand Down
6 changes: 2 additions & 4 deletions modules/components/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,13 @@ var Routes = React.createClass({

propTypes: {
onAbortedTransition: React.PropTypes.func.isRequired,
onTransitionError: React.PropTypes.func.isRequired,
preserveScrollPosition: React.PropTypes.bool
onTransitionError: React.PropTypes.func.isRequired
},

getDefaultProps: function () {
return {
onAbortedTransition: defaultAbortedTransitionHandler,
onTransitionError: defaultTransitionErrorHandler,
preserveScrollPosition: false
onTransitionError: defaultTransitionErrorHandler
};
},

Expand Down