mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 14:07:09 +03:00
fix newleafurls
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user