Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaHydrae committed Nov 25, 2024
1 parent 09df307 commit fd4945a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,16 @@ function parseEnvironmentBoolean(variableName, defaultValue) {
const value = getEnvironmentString(variableName, defaultValue === undefined);
if (value === undefined) {
return defaultValue;
} else if (/^(?:1|y|yes|t|true)$/u.text(value)) {
} else if (/^(?:1|y|yes|t|true)$/u.test(value)) {
return true;
} else if (/^(?:0|n|no|f|false)$/u.test(value)) {
return false;
}

throw new Error(
`$${variableName} must be a boolean, but its value is ${JSON.stringify(value)}`
`$${variableName} must be a boolean, but its value is ${JSON.stringify(
value
)}`
);
}

Expand Down

0 comments on commit fd4945a

Please sign in to comment.