From eb2f3669e316cf5c0832264d47823c26797a7b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Rouleau?= Date: Fri, 3 Jan 2020 12:36:33 -0500 Subject: [PATCH] Fix plugin.withOptions() when no config function is passed --- src/util/createPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/createPlugin.js b/src/util/createPlugin.js index e61478684097..78003508a487 100644 --- a/src/util/createPlugin.js +++ b/src/util/createPlugin.js @@ -9,7 +9,7 @@ createPlugin.withOptions = function(pluginFunction, configFunction) { const optionsFunction = function(options) { return { handler: pluginFunction(options), - config: configFunction(options), + config: configFunction ? configFunction(options) : {}, } }