mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-26 15:42:27 -05:00
Fix exception
This commit is contained in:
parent
4f61f9e74d
commit
6f73c51b12
@ -417,17 +417,21 @@ const AccountRegister = React.createClass({
|
|||||||
},
|
},
|
||||||
componentWillReceiveProps: function(nextProps) {
|
componentWillReceiveProps: function(nextProps) {
|
||||||
if (nextProps.selectedAccount != this.props.selectedAccount) {
|
if (nextProps.selectedAccount != this.props.selectedAccount) {
|
||||||
|
this.setState({
|
||||||
|
selectedTransaction: new Transaction(),
|
||||||
|
transactions: []
|
||||||
|
});
|
||||||
this.getTransactionPage(nextProps.selectedAccount, 0);
|
this.getTransactionPage(nextProps.selectedAccount, 0);
|
||||||
console.log("TODO begin fetching transactions for new account");
|
console.log("TODO begin fetching transactions for new account");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
var name = "Please select an account";
|
var name = "Please select an account";
|
||||||
if (this.props.selectedAccount != null)
|
register = [];
|
||||||
|
|
||||||
|
if (this.props.selectedAccount != null) {
|
||||||
name = this.props.selectedAccount.Name;
|
name = this.props.selectedAccount.Name;
|
||||||
|
|
||||||
register = [];
|
|
||||||
if (this.props.selectedAccount != null) {
|
|
||||||
var newTransaction = new Transaction();
|
var newTransaction = new Transaction();
|
||||||
newTransaction.Description = "Create New Transaction...";
|
newTransaction.Description = "Create New Transaction...";
|
||||||
newTransaction.Status = TransactionStatus.Entered;
|
newTransaction.Status = TransactionStatus.Entered;
|
||||||
|
Loading…
Reference in New Issue
Block a user