mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Fix is number check
This commit is contained in:
parent
1475c91327
commit
8574ec3a0c
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ function loadFromEnv(config: SBSConfig, prefix = "") {
|
|||
loadFromEnv(data, fullKey);
|
||||
} else if (process.env[fullKey]) {
|
||||
const value = process.env[fullKey];
|
||||
if (isNumber(value)) {
|
||||
if (value !== "" && !isNaN(value as unknown as number)) {
|
||||
config[key] = parseFloat(value);
|
||||
} else if (value.toLowerCase() === "true" || value.toLowerCase() === "false") {
|
||||
config[key] = value === "true";
|
||||
|
|
Loading…
Reference in a new issue