Skip to content

Commit

Permalink
Added safe navigation operators in settings dialog component to fix
Browse files Browse the repository at this point in the history
failing tests.
  • Loading branch information
imolorhe committed Jan 13, 2018
1 parent 92cd698 commit 2b2d7d4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<clr-modal [clrModalOpen]="settings.isShown" (clrModalOpenChange)="toggleDialogChange.next($event)">
<clr-modal [clrModalOpen]="settings?.isShown" (clrModalOpenChange)="toggleDialogChange.next($event)">
<h3 class="modal-title">
<div class="app-dialog-header">
<div class="app-dialog-title">{{ 'SETTINGS_TEXT' | translate }}</div>
Expand All @@ -10,7 +10,7 @@ <h3 class="modal-title">
<div class="app-dialog-section">
<label>{{ 'SETTINGS_THEME_TEXT' | translate }}</label>
<select class="dialog-select" (change)="onSelectTheme($event.target.value)">
<option *ngFor="let theme of themes" value="{{ theme }}" [selected]="theme === settings.theme">
<option *ngFor="let theme of themes" value="{{ theme }}" [selected]="theme === settings?.theme">
{{ theme | titlecase }}
</option>
</select>
Expand All @@ -19,7 +19,7 @@ <h3 class="modal-title">
<div class="app-dialog-section">
<label>{{ 'SETTINGS_LANGUAGE_TEXT' | translate }}</label>
<select class="dialog-select" (change)="onSelectLanguage($event.target.value)">
<option *ngFor="let language of languages" value="{{ language[0] }}" [selected]="language === settings.language">
<option *ngFor="let language of languages" value="{{ language[0] }}" [selected]="language === settings?.language">
{{ language[1] | titlecase }}
</option>
</select>
Expand Down

0 comments on commit 2b2d7d4

Please sign in to comment.