diff --git a/oidc-ui/src/components/Background.js b/oidc-ui/src/components/Background.js index 63d3035fb..bbd0368b3 100644 --- a/oidc-ui/src/components/Background.js +++ b/oidc-ui/src/components/Background.js @@ -31,8 +31,9 @@ export default function Background({ // check if background logo is needed or not, // create div according to the environment variable + console.log("REACT_APP_BACKGROUND_LOGO", getBooleanValue("REACT_APP_BACKGROUND_LOGO")) const backgroundLogoDiv = - getBooleanValue(process.env.REACT_APP_BACKGROUND_LOGO) ? ( + getBooleanValue("REACT_APP_BACKGROUND_LOGO") ? (
({ diff --git a/oidc-ui/src/services/utilService.js b/oidc-ui/src/services/utilService.js index de13876f1..3622971a1 100644 --- a/oidc-ui/src/services/utilService.js +++ b/oidc-ui/src/services/utilService.js @@ -1,9 +1,13 @@ const getBooleanValue = (inputValue) => { - if (typeof(inputValue) === 'undefined' || inputValue === null || inputValue === '') { - console.log("no input provided") + var val = process.env[inputValue] + console.log(inputValue, val) + console.log(typeof val) + if (typeof(val) === 'undefined' || val === null || val === '') { + console.log("no input provided", inputValue) return false; } - return /^true$/i.test(inputValue); + console.log("valid input provided", inputValue) + return /^true$/i.test(val); } export { getBooleanValue }; \ No newline at end of file