From 21c30f91c7048b9adc0d4603f3e41e6eb9b8bf6c Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Wed, 10 May 2017 15:22:17 +0300 Subject: [PATCH] fix: regression error with `plugins`. --- lib/options.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 = {}