From f520e00ed42d2be81a58b71f1a0ed41c227ed408 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 20 May 2022 04:53:31 -0400 Subject: [PATCH] Fix null values messing with env import --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 8013e81..aa8ac5f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -165,7 +165,7 @@ function loadFromEnv(config: SBSConfig, prefix = "") { const fullKey = (prefix ? `${prefix}_` : "") + key; const data = config[key]; - if (typeof data === "object" && !Array.isArray(data)) { + if (data && typeof data === "object" && !Array.isArray(data)) { loadFromEnv(data, fullKey); } else if (process.env[fullKey]) { const value = process.env[fullKey];