chore: Update WebSocket server code from feedback (#14417)

This commit is contained in:
Ben Reinhart
2021-05-04 22:07:53 -07:00
committed by GitHub
parent a816655715
commit 90a72bf8d2
3 changed files with 69 additions and 71 deletions

View File

@@ -117,12 +117,12 @@ function applyEnvOverrides(config: ConfigType): ConfigType {
STATSD_GLOBAL_TAGS: val => (config.statsd.globalTags = toStringArray(val)),
};
for (const [envVar, set] of Object.entries(envVarConfigSetter)) {
Object.entries(envVarConfigSetter).forEach(([envVar, set]) => {
const envValue = process.env[envVar];
if (envValue && isPresent(envValue)) {
set(envValue);
}
}
});
return config;
}