diff --git a/src/public/js/app.js b/src/public/js/app.js index 6fb6f4b..2948267 100644 --- a/src/public/js/app.js +++ b/src/public/js/app.js @@ -43,7 +43,7 @@ import getRoutes from './routes' function mapStateToProps(state) { return { username: state.userStore.username, - torrentCount: state.torrentStore.torrents.length, + torrentCount: state.torrentStore.get('torrents').size, alerts: state.alerts, } } diff --git a/src/public/js/components/torrents/list.js b/src/public/js/components/torrents/list.js index cc791c0..443fe9a 100644 --- a/src/public/js/components/torrents/list.js +++ b/src/public/js/components/torrents/list.js @@ -4,7 +4,7 @@ import { bindActionCreators } from 'redux' import { addTorrent } from '../../actions/actionCreators' function mapStateToProps(state) { - return { torrents: state.torrentStore.torrents }; + return { torrents: state.torrentStore.get('torrents') }; } const mapDispatchToProps = (dispatch) => bindActionCreators({ addTorrent }, dispatch) @@ -67,7 +67,7 @@ class AddTorrent extends React.PureComponent { class List extends React.PureComponent { render() { - if (this.props.torrents.length === 0) { + if (this.props.torrents.size === 0) { return (