Skip to content

Commit

Permalink
fix: boolean string env var function
Browse files Browse the repository at this point in the history
  • Loading branch information
andyesp committed Sep 21, 2023
1 parent 1209d17 commit df21022
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import env from 'decentraland-gatsby/dist/utils/env'
import isEthereumAddress from 'validator/lib/isEthereumAddress'

import { trimOtterspaceId } from './back/utils/contractInteractions'
Expand All @@ -6,7 +7,7 @@ import { clientEnv } from './utils/clientEnv'
import Candidates from './utils/delegates/candidates.json'

function getBooleanStringVar(variableName: string, defaultValue: boolean) {
const enabled = clientEnv(variableName)
const enabled = env(variableName)
if (enabled && enabled.length > 0) return enabled === 'true'
return defaultValue
}
Expand Down

0 comments on commit df21022

Please sign in to comment.