Skip to content

Commit

Permalink
fix: regression with options.plugins {Function} (`webpack.config.…
Browse files Browse the repository at this point in the history
…js`) (#229)
  • Loading branch information
evilebottnawi authored and michael-ciniawsky committed May 10, 2017
1 parent cc6544e commit dca52a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/options.js
Original file line number Diff line number Diff line change
@@ -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 = {}
Expand Down

0 comments on commit dca52a9

Please sign in to comment.