Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #809 from LiskHQ/808-issue-in-transactions-load-more
Browse files Browse the repository at this point in the history
Hot fix for loading transactions for the first time - Closes #808
  • Loading branch information
reyraa authored Oct 4, 2017
2 parents 6e1cfcd + ef0d4b1 commit 4ec0fb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/transactions/transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class Transactions extends React.Component {
}

componentDidUpdate() {
this.canLoadMore = this.props.count > this.props.transactions.length;
const { count, transactions } = this.props;
this.canLoadMore = count === null || count > transactions.length;
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion src/store/reducers/transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import actionTypes from '../../constants/actions';
* @param {Array} state
* @param {Object} action
*/
const transactions = (state = { pending: [], confirmed: [], count: 0 }, action) => {
const transactions = (state = { pending: [], confirmed: [], count: null }, action) => {
switch (action.type) {
case actionTypes.transactionAdded:
return Object.assign({}, state, {
Expand Down

0 comments on commit 4ec0fb0

Please sign in to comment.