From ad197a6a92e492c5c08211e075dea37ce9f9dfd6 Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Mon, 26 Aug 2019 10:28:39 +0800
Subject: [PATCH] remove a js error when a variable is not initialised

---
 src/app/login/login.component.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html
index 8c97cd2..718a9a0 100644
--- a/src/app/login/login.component.html
+++ b/src/app/login/login.component.html
@@ -28,7 +28,7 @@
                         </div>
                         <div fxLayout="row" fxLayoutAlign="space-around center" style="width: 100%">
                             <button mat-flat-button (click)="login()" color=primary style="width: 25%; text-align: center">Login</button>
-                            <button *ngIf="(authService.loggedInAuthZ | async).length > 0" mat-flat-button  routerLink="/launch" color=warn style="width: 25%; text-align: center">Cancel</button>
+                            <button *ngIf="(authService.loggedInAuthZ | async) != null && (authService.loggedInAuthZ | async).length > 0" mat-flat-button  routerLink="/launch" color=warn style="width: 25%; text-align: center">Cancel</button>
                         </div>
                         <div *ngIf="selected !== undefined" [innerHTML]="selected.desc">
                         </div>
-- 
GitLab