Skip to content

Commit

Permalink
refactor: remove usage of _.isNil
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Mar 9, 2024
1 parent 4b5ee3c commit 9253922
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/license-plugin.js
Expand Up @@ -372,7 +372,7 @@ class LicensePlugin {
* @private
*/
_readBanner(banner) {
if (_.isNil(banner)) {
if (banner == null) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/schema-validator.js
Expand Up @@ -69,7 +69,7 @@ function validateObject(obj, schema, current) {
const errors = [];

_.forEach(obj, (value, k) => {
if (_.isNil(value)) {
if (value == null) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/schema-validators.js
Expand Up @@ -71,7 +71,7 @@ function isNumber(value) {
* @return {boolean} `true` if `value` is `null` or `undefined`, `false` otherwise.
*/
function isNil(value) {
return _.isNil(value);
return value == null;
}

/**
Expand Down

0 comments on commit 9253922

Please sign in to comment.