Move default value in account constructor.
This commit is contained in:
parent
c6761e1379
commit
c4baf94d3a
@ -58,13 +58,7 @@ export class AccountController {
|
|||||||
* Add an empty account.
|
* Add an empty account.
|
||||||
*/
|
*/
|
||||||
add() {
|
add() {
|
||||||
var account = new Account({
|
return this.modify(new Account());
|
||||||
// eslint-disable-next-line camelcase
|
|
||||||
authorized_overdraft: 0
|
|
||||||
});
|
|
||||||
|
|
||||||
// Insert account at the begining of the array.
|
|
||||||
return this.modify(account);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -8,4 +8,8 @@ export class Account {
|
|||||||
authorized_overdraft: number;
|
authorized_overdraft: number;
|
||||||
|
|
||||||
balances: AccountBalances;
|
balances: AccountBalances;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.authorized_overdraft = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user