From cc5b0b1ee1b7680eb1f1dd6a263d8edfbcc32c27 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 21 Jul 2017 22:42:16 +0200 Subject: [PATCH] Fix condition. --- src/accounts/accountRow.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/accounts/accountRow.component.ts b/src/accounts/accountRow.component.ts index 7c42bf8..64a7dcc 100644 --- a/src/accounts/accountRow.component.ts +++ b/src/accounts/accountRow.component.ts @@ -89,12 +89,14 @@ export class AccountRowComponent implements OnInit { } get warning() { - return this.account.authorized_overdraft < this.accountBalances.current + return this.account && this.accountBalances + && this.account.authorized_overdraft < this.accountBalances.current && this.accountBalances.current < 0; }; get error() { - return this.accountBalances.current < this.account.authorized_overdraft; + return this.account && this.accountBalances + && this.accountBalances.current < this.account.authorized_overdraft; }; /*