fix: Empty string not parsed as false boolean in env validation

closes #3581
This commit is contained in:
Tom Moor
2022-05-24 07:59:52 +01:00
parent ef5e3f0b29
commit 6413797c34

View File

@@ -495,12 +495,13 @@ export class Environment {
* 1 = true
* "true" = true
* "false" = false
* "" = false
*
* @param value The string to convert
* @returns A boolean
*/
private toBoolean(value: string) {
return !!JSON.parse(value);
return value ? !!JSON.parse(value) : false;
}
}