Skip to content

Commit

Permalink
Fix is number check
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Feb 8, 2024
1 parent 1475c91 commit 8574ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 8574ec3

Please sign in to comment.