Move default value in account constructor.

This commit is contained in:
Alexis Lahouze 2017-07-14 10:15:07 +02:00
parent c6761e1379
commit c4baf94d3a
2 changed files with 5 additions and 7 deletions

View File

@ -58,13 +58,7 @@ export class AccountController {
* Add an empty account.
*/
add() {
var account = new Account({
// eslint-disable-next-line camelcase
authorized_overdraft: 0
});
// Insert account at the begining of the array.
return this.modify(account);
return this.modify(new Account());
};
/*

View File

@ -8,4 +8,8 @@ export class Account {
authorized_overdraft: number;
balances: AccountBalances;
constructor() {
this.authorized_overdraft = 0;
}
}