Fix null values messing with env import

This commit is contained in:
Ajay
2022-05-20 04:53:31 -04:00
parent 21f7d5d938
commit f520e00ed4

View File

@@ -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];