Skip to content

Commit 92608a3

Browse files
committed
fix: use default value for null options
1 parent 1b291d8 commit 92608a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/resolve-config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const {isUndefined} = require('lodash');
1+
const {isNil} = require('lodash');
22

33
module.exports = ({changelogFile, changelogTitle}) => ({
4-
changelogFile: isUndefined(changelogFile) ? 'CHANGELOG.md' : changelogFile,
4+
changelogFile: isNil(changelogFile) ? 'CHANGELOG.md' : changelogFile,
55
changelogTitle,
66
});

lib/verify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {isString, isUndefined} = require('lodash');
1+
const {isString, isNil} = require('lodash');
22
const AggregateError = require('aggregate-error');
33
const getError = require('./get-error');
44
const resolveConfig = require('./resolve-config');
@@ -15,7 +15,7 @@ module.exports = pluginConfig => {
1515

1616
const errors = Object.entries(options).reduce(
1717
(errors, [option, value]) =>
18-
!isUndefined(value) && value !== false && !VALIDATORS[option](value)
18+
!isNil(value) && !VALIDATORS[option](value)
1919
? [...errors, getError(`EINVALID${option.toUpperCase()}`, {[option]: value})]
2020
: errors,
2121
[]

0 commit comments

Comments
 (0)