Skip to content

Commit

Permalink
fix: envOrNumber behavior (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmackrodt authored Sep 28, 2020
1 parent d2476dd commit 7d8897c
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 @@ -43,7 +43,7 @@ function envOrString(environment: string | undefined, string?: string): string {
* @param number Default number. If not set, is `0`.
*/
function envOrNumber(environment: string | undefined, number?: number): number {
return Number(environment ?? (number ?? 0));
return environment ? Number(environment) : (number ?? 0);
}

const browser = {
Expand Down

0 comments on commit 7d8897c

Please sign in to comment.