fix newleafurls

This commit is contained in:
Ajay
2022-05-06 01:53:44 -04:00
parent b4b7ccec20
commit d8395163b9
2 changed files with 4 additions and 3 deletions

View File

@@ -165,9 +165,10 @@ function migrate(config: SBSConfig) {
function loadFromEnv(config: SBSConfig, prefix = "") {
for (const key in config) {
const fullKey = (prefix ? `${prefix}_` : "") + key;
const data = config[key];
if (typeof config[key] === "object") {
loadFromEnv(config[key], fullKey);
if (typeof data === "object" && !Array.isArray(data)) {
loadFromEnv(data, fullKey);
} else if (process.env[fullKey]) {
const value = process.env[fullKey];
if (isNumber(value)) {