Skip to content

Commit

Permalink
Fix envVars GUI for new apps
Browse files Browse the repository at this point in the history
This fixes a bug where environment variables for new apps weren't shown in the GUI.

Signed-off-by: Jan Jucca Patzelt <[email protected]>
  • Loading branch information
Jan Jucca Patzelt committed Jul 15, 2024
1 parent a9a4a47 commit 2762c8e
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 2762c8e

Please sign in to comment.