diff --git a/lib/utils.js b/lib/utils.js index a6752d8..be3f636 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,7 +1,8 @@ 'use strict'; function getProp(obj, path, defaultValue) { - return obj[path] === undefined ? defaultValue : obj[path]; + const value = obj[path]; + return (value === null || value === undefined) ? defaultValue : value; } function setProp(obj, path, value) { @@ -34,4 +35,4 @@ module.exports = { getProp, setProp, unsetProp, -}; \ No newline at end of file +};