Fix plugin.withOptions() when no config function is passed

This commit is contained in:
Benoît Rouleau 2020-01-03 12:36:33 -05:00
parent 83f88cc2d4
commit eb2f3669e3

View file

@ -9,7 +9,7 @@ createPlugin.withOptions = function(pluginFunction, configFunction) {
const optionsFunction = function(options) {
return {
handler: pluginFunction(options),
config: configFunction(options),
config: configFunction ? configFunction(options) : {},
}
}