1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00

Use coalesce instead of if

This commit is contained in:
Gastón Fournier 2025-10-23 13:47:26 +02:00
parent a0ac6502fa
commit 9cb27364a0
No known key found for this signature in database
GPG Key ID: AF45428626E17A8E

View File

@ -787,9 +787,8 @@ export function createConfig(options: IUnleashOptions): IUnleashConfig {
process.env.PROMETHEUS_IMPACT_METRICS_API;
const checkDbOnReady =
typeof options.checkDbOnReady === 'boolean'
? options.checkDbOnReady
: parseEnvVarBoolean(process.env.CHECK_DB_ON_READY, false);
Boolean(options.checkDbOnReady) ??
parseEnvVarBoolean(process.env.CHECK_DB_ON_READY, false);
return {
db,