Skip to content

Commit df993c7

Browse files
committed
fix: use default value for null options
1 parent 124aca1 commit df993c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/verify-config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {isString, isUndefined, isBoolean} = require('lodash');
1+
const {isString, isNil, isBoolean} = require('lodash');
22
const getError = require('./get-error');
33

44
const isNonEmptyString = value => isString(value) && value.trim();
@@ -12,7 +12,7 @@ const VALIDATORS = {
1212
module.exports = ({npmPublish, tarballDir, pkgRoot}) => {
1313
const errors = Object.entries({npmPublish, tarballDir, pkgRoot}).reduce(
1414
(errors, [option, value]) =>
15-
!isUndefined(value) && value !== false && !VALIDATORS[option](value)
15+
!isNil(value) && !VALIDATORS[option](value)
1616
? [...errors, getError(`EINVALID${option.toUpperCase()}`, {[option]: value})]
1717
: errors,
1818
[]

0 commit comments

Comments
 (0)