Skip to content

Commit

Permalink
Fix default check in option getter
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree committed Dec 19, 2023
1 parent 88d561b commit 76e94a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/clide-js/src/core/options/option-getter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ export function createOptionGetter<
// function, so we need to check for an empty string and use the
// default value if provided.
// see: https://github.com/terkelg/prompts/issues/410
if (value === '' && config?.default) {
return validateFn!(config?.default);
if (value === '' && config?.default !== undefined) {
value = config?.default;
}
return validateFn!(value);
}
Expand Down

0 comments on commit 76e94a5

Please sign in to comment.