Skip to content

Commit 5385f72

Browse files
committed
fix(prompt): fix hasDefault check for --auto values
1 parent 218d529 commit 5385f72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ui/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const ora = require('ora');
33
const omit = require('lodash/omit');
44
const chalk = require('chalk');
55
const execa = require('execa');
6+
const isNil = require('lodash/isNil');
67
const Listr = require('listr');
78
const Table = require('cli-table3');
89
const Promise = require('bluebird');
@@ -26,7 +27,7 @@ const defaultOptions = {
2627
};
2728

2829
function hasDefault(prompt = {}) {
29-
return isObject(prompt) && prompt.hasOwnProperty('default');
30+
return isObject(prompt) && !isNil(prompt.default);
3031
}
3132

3233
function getDefault(prompt = {}) {

0 commit comments

Comments
 (0)