diff --git a/lib/options.js b/lib/options.js index f7e0ddbd..56cff551 100644 --- a/lib/options.js +++ b/lib/options.js @@ -1,14 +1,14 @@ 'use strict' module.exports = function parseOptions (params) { - if (typeof params === 'function') { - params = params.call(this, this) + if (typeof params.plugins === 'function') { + params.plugins = params.plugins.call(this, this) } let plugins - if (typeof params === 'undefined') plugins = [] - else if (Array.isArray(params)) plugins = params + if (typeof params.plugins === 'undefined') plugins = [] + else if (Array.isArray(params.plugins)) plugins = params.plugins else plugins = params.plugins const options = {}