Skip to content

Commit

Permalink
check config before accessing it (#2057)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored May 27, 2022
1 parent ad6eca2 commit bc7792d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/shell/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ glob.sync(path.join((process.env.OOD_CLUSTERS || '/etc/ood/config/clusters.d'),
return yaml.safeLoad(fs.readFileSync(yml));
} catch(err) { /** just keep going. dashboard should have an alert about it */}
})
.filter(config => (config.v2 && config.v2.login && config.v2.login.host) && ! (config.v2 && config.v2.metadata && config.v2.metadata.hidden))
.filter(config => (config && config.v2 && config.v2.login && config.v2.login.host) && ! (config.v2 && config.v2.metadata && config.v2.metadata.hidden))
.forEach((config) => {
let host = config.v2.login.host; //Already did checking above
let isDefault = config.v2.login.default;
Expand Down

0 comments on commit bc7792d

Please sign in to comment.