Fix is number check

This commit is contained in:
Ajay 2024-02-07 22:28:28 -05:00
parent 1475c91327
commit 8574ec3a0c

View file

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