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() {
|
||||
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());
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -8,4 +8,8 @@ export class Account {
|
||||
authorized_overdraft: number;
|
||||
|
||||
balances: AccountBalances;
|
||||
|
||||
constructor() {
|
||||
this.authorized_overdraft = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user