ciyidogan commited on
Commit
f68b441
·
verified ·
1 Parent(s): b8de5e3

Update flare-ui/src/app/components/environment/environment.component.ts

Browse files
flare-ui/src/app/components/environment/environment.component.ts CHANGED
@@ -62,6 +62,12 @@ export class EnvironmentComponent implements OnInit {
62
  this.apiService.getEnvironment().subscribe({
63
  next: (env) => {
64
  this.environment = env;
 
 
 
 
 
 
65
  this.loading = false;
66
  },
67
  error: (err) => {
@@ -120,6 +126,9 @@ export class EnvironmentComponent implements OnInit {
120
  if (this.environment.stt_engine === 'no_stt') {
121
  this.environment.stt_engine_api_key = '';
122
  }
 
 
 
123
  }
124
 
125
  getSTTKeyLabel(): string {
 
62
  this.apiService.getEnvironment().subscribe({
63
  next: (env) => {
64
  this.environment = env;
65
+
66
+ // Ensure stt_settings exists with defaults
67
+ if (!this.environment.stt_settings) {
68
+ this.environment.stt_settings = this.getDefaultSTTSettings();
69
+ }
70
+
71
  this.loading = false;
72
  },
73
  error: (err) => {
 
126
  if (this.environment.stt_engine === 'no_stt') {
127
  this.environment.stt_engine_api_key = '';
128
  }
129
+
130
+ // Always ensure STT settings exist
131
+ this.ensureSTTSettings();
132
  }
133
 
134
  getSTTKeyLabel(): string {