Skip to content

Commit

Permalink
Fix plugin.withOptions() when no config function is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
benface committed Jan 3, 2020
1 parent 83f88cc commit eb2f366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/createPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ createPlugin.withOptions = function(pluginFunction, configFunction) {
const optionsFunction = function(options) {
return {
handler: pluginFunction(options),
config: configFunction(options),
config: configFunction ? configFunction(options) : {},
}
}

Expand Down

0 comments on commit eb2f366

Please sign in to comment.