Skip to content

Commit

Permalink
Merge pull request #120 from oceanprotocol/fix-env-var
Browse files Browse the repository at this point in the history
fix getEnvValue() on config
  • Loading branch information
paulo-ocean authored Nov 20, 2023
2 parents d6bbc1a + 868c240 commit 4c454d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function getPeerIdFromPrivateKey(

function getEnvValue(env: any, defaultValue: any) {
/* Gets value for an ENV var, returning defaultValue if not defined */
return process.env.envName != null ? env : defaultValue
return env != null ? (env as string) : defaultValue
}

function getIntEnvValue(env: any, defaultValue: number) {
Expand Down

0 comments on commit 4c454d5

Please sign in to comment.