Switched on the @typescript-eslint/no-non-null-assertion rule in eslint.
Fixed the errors it threw up.
This commit is contained in:
@@ -71,7 +71,7 @@ export class JournalDialogComponent implements OnInit {
|
||||
|
||||
accept(): void {
|
||||
const formValue = this.form.value;
|
||||
const amount = this.math.journalAmount(formValue.amount, formValue.debit!);
|
||||
const amount = this.math.journalAmount(formValue.amount, formValue.debit ?? 1);
|
||||
this.data.journal.debit = amount.debit;
|
||||
this.data.journal.account = this.account;
|
||||
this.data.journal.amount = amount.amount;
|
||||
|
||||
Reference in New Issue
Block a user