mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-13 15:06:59 +03:00
Fix null values messing with env import
This commit is contained in:
@@ -165,7 +165,7 @@ function loadFromEnv(config: SBSConfig, prefix = "") {
|
|||||||
const fullKey = (prefix ? `${prefix}_` : "") + key;
|
const fullKey = (prefix ? `${prefix}_` : "") + key;
|
||||||
const data = config[key];
|
const data = config[key];
|
||||||
|
|
||||||
if (typeof data === "object" && !Array.isArray(data)) {
|
if (data && typeof data === "object" && !Array.isArray(data)) {
|
||||||
loadFromEnv(data, fullKey);
|
loadFromEnv(data, fullKey);
|
||||||
} else if (process.env[fullKey]) {
|
} else if (process.env[fullKey]) {
|
||||||
const value = process.env[fullKey];
|
const value = process.env[fullKey];
|
||||||
|
|||||||
Reference in New Issue
Block a user