mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 10:16:32 -05:00
config/utils.ts: toBooleanConfig can return undefined
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
943ddc4058
commit
3389a86689
1 changed files with 2 additions and 2 deletions
|
@ -1,11 +1,11 @@
|
|||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
export function toBooleanConfig (configValue: string | boolean | undefined): boolean {
|
||||
export function toBooleanConfig (configValue: string | boolean | undefined): boolean | undefined {
|
||||
if (typeof configValue === 'string') {
|
||||
return (configValue === 'true')
|
||||
}
|
||||
return configValue || false
|
||||
return configValue
|
||||
}
|
||||
|
||||
export function toArrayConfig (configValue: string | undefined, separator = ',', fallback = []): any[] {
|
||||
|
|
Loading…
Reference in a new issue