This repository was archived by the owner on Mar 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
cryptr/cryptr-angular/src/lib/account-access-button
playground/src/app/components/nav Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export class AccountAccessButtonComponent implements OnChanges {
56
56
errorBtnClass = ERROR_BTN_CLASS ;
57
57
58
58
closeAccountPopup ( ) : void {
59
- if ( this . accountPopup !== undefined ) {
59
+ if ( typeof this . accountPopup !== ' undefined' && this . accountPopup !== null ) {
60
60
this . accountPopup . close ( ) ;
61
61
}
62
62
}
@@ -168,14 +168,14 @@ export class AccountAccessButtonComponent implements OnChanges {
168
168
}
169
169
170
170
initials ( ) : any {
171
- if ( ! this . isAuthenticated ( ) || this . user ( ) === undefined || this . fullName ( ) === undefined ) {
171
+ if ( ! this . isAuthenticated ( ) || typeof this . user ( ) === ' undefined' || typeof this . fullName ( ) === ' undefined' ) {
172
172
return ;
173
173
}
174
174
return this . fullName ( ) . match ( / \b ( \w ) / g) . join ( '' ) ;
175
175
}
176
176
177
177
fullName ( ) : any {
178
- if ( ! this . isAuthenticated ( ) || this . user ( ) === undefined || this . email ( ) === undefined ) {
178
+ if ( ! this . isAuthenticated ( ) || typeof this . user ( ) === ' undefined' || typeof this . email ( ) === ' undefined' ) {
179
179
return ;
180
180
}
181
181
const emailName = this . email ( ) . split ( '@' ) [ 0 ] ;
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ export class NavComponent implements OnInit {
27
27
ngOnInit ( ) : void {
28
28
this . cryptrListeners ( ) ;
29
29
this . auth . currentAuthenticationObservable ( ) . subscribe ( ( isAuthenticated : boolean ) => {
30
- console . log ( isAuthenticated ) ;
31
30
this . authenticated = isAuthenticated ;
32
31
} ) ;
33
32
this . auth . getObservableUser ( ) . subscribe ( ( user ) => {
You can’t perform that action at this time.
0 commit comments