Skip to content

Commit ac21390

Browse files
authored
Merge pull request #1293 from benface/config-fn-fix
Fix plugin.withOptions() when no config function is passed
2 parents 83f88cc + eb2f366 commit ac21390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/createPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ createPlugin.withOptions = function(pluginFunction, configFunction) {
99
const optionsFunction = function(options) {
1010
return {
1111
handler: pluginFunction(options),
12-
config: configFunction(options),
12+
config: configFunction ? configFunction(options) : {},
1313
}
1414
}
1515

0 commit comments

Comments
 (0)