From bc7792d009516f9fbb954089da54d8fb5420f1d5 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Fri, 27 May 2022 14:33:14 -0400 Subject: [PATCH] check config before accessing it (#2057) --- apps/shell/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/shell/app.js b/apps/shell/app.js index 20ed27ce46..83dd97dc97 100644 --- a/apps/shell/app.js +++ b/apps/shell/app.js @@ -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;