Skip toJS() call in default mapStateToProps function

This commit is contained in:
Kyle Shockey
2017-11-16 21:38:41 -08:00
parent d284a3d243
commit d28bf86129

View File

@@ -22,7 +22,7 @@ const RootWrapper = (reduxStore, ComponentToWrap) => class extends Component {
const makeContainer = (getSystem, component, reduxStore) => {
const mapStateToProps = function(state, ownProps) {
const propsForContainerComponent = Object.assign({}, ownProps, getSystem())
const ori = component.prototype.mapStateToProps || (state => state.toJS())
const ori = component.prototype.mapStateToProps || (state => { return {state} })
return ori(state, propsForContainerComponent)
}