Simpified boolean check (see fix in prev commit)
This commit is contained in:
parent
a8d4b3a2d3
commit
29e923cce6
@ -19,12 +19,6 @@ export class ConfigService {
|
|||||||
|
|
||||||
parseBool(value: string | undefined, def: boolean): boolean {
|
parseBool(value: string | undefined, def: boolean): boolean {
|
||||||
if (!value) return def;
|
if (!value) return def;
|
||||||
switch (value) {
|
return value === "true" || value === "1";
|
||||||
case "false":
|
|
||||||
case "0":
|
|
||||||
return false;
|
|
||||||
default:
|
|
||||||
return Boolean(value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user