Skip to content

Commit

Permalink
Merge pull request #76 from stackitcloud/fix-envVars-GUI
Browse files Browse the repository at this point in the history
Fix environment variables GUI for new apps
  • Loading branch information
norman-abramovitz authored Jul 17, 2024
2 parents a9a4a47 + 2762c8e commit 89e98a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class VariablesTabComponent implements OnInit {
if (envVarType === 'cfGuid' || envVarType === stratosEndpointGuidKey) {
return;
}
const envVars = allEnvVars[0].entity[envVarType];
const envVars = (allEnvVars[0].entity[envVarType]) ? allEnvVars[0].entity[envVarType] : {};
result.push({
section: true,
name: envVarType.replace('_json', ''),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class CfAppVariablesDataSource extends ListDataSource<ListAppEnvVar, APIR
if (!variables || variables.length === 0) {
return [];
}
const env = variables[0].entity.environment_json;
const env = (variables[0].entity.environment_json) ? variables[0].entity.environment_json : {};
const rows = Object.keys(env).map(name => ({ name, value: env[name] }));
return rows;
}),
Expand Down

0 comments on commit 89e98a1

Please sign in to comment.