diff --git a/lib/util.js b/lib/util.js index db1069c7..e170db3c 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1295,7 +1295,7 @@ exports.mergeOptions = function (mergeTarget, options, option, allowDeletion = f } else { if (options[option].enabled === undefined) { - if (globalOptions[option].enabled !== undefined) { + if (globalOptions[option] !== undefined && globalOptions[option].enabled !== undefined) { mergeTarget[option].enabled = globalOptions[option].enabled; } else { // assume this is the correct value