Fixed the bool converter for null values
continuous-integration/drone/pr Build is passing Details

ref #110
This commit is contained in:
Nicolai Ort 2021-01-20 18:28:41 +01:00
parent 434aaf6136
commit e12aedd1aa
1 changed files with 8 additions and 1 deletions

View File

@ -10,7 +10,7 @@ export const config = {
phone_validation_countrycode: getPhoneCodeLocale(),
postalcode_validation_countrycode: getPostalCodeLocale(),
version: process.env.VERSION || require('../package.json').version,
seedTestData: JSON.parse(process.env.SEED_TEST_DATA) || false
seedTestData: getDataSeeding()
}
let errors = 0
if (typeof config.internal_port !== "number") {
@ -31,4 +31,11 @@ function getPostalCodeLocale(): any {
return null;
}
}
function getDataSeeding(): Boolean {
try {
return JSON.parse(process.env.SEED_TEST_DATA);
} catch (error) {
return false;
}
}
export let e = errors