Skip to content

Commit

Permalink
fix: correctly resolve default string config values
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Oct 2, 2024
1 parent 63f3dfe commit aaf358b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export function getConfigValue<T>(
key: string,
defaultValue?: T,
): T | undefined {
return folderConfig.get(key) ?? rootConfig.get(key) ?? defaultValue
if (typeof defaultValue === 'boolean') {
return folderConfig.get(key) ?? rootConfig.get(key) ?? defaultValue
}
return folderConfig.get(key) || rootConfig.get(key) || defaultValue
}

export function getConfig(workspaceFolder?: WorkspaceFolder) {
Expand Down

0 comments on commit aaf358b

Please sign in to comment.