1
0

fix: parseBooleanProp

This commit is contained in:
Dominik Pschenitschni 2022-10-24 15:40:39 +02:00 committed by kolaente
parent 51dc123d89
commit 8dea4082bb
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -1,5 +1,5 @@
export function parseBooleanProp(booleanProp: string) { export function parseBooleanProp(booleanProp: string | undefined) {
return (booleanProp === 'false' || booleanProp === '0') return (booleanProp === 'false' || booleanProp === '0')
? false ? false
: Boolean(booleanProp) : Boolean(booleanProp)
} }