From 074e7aed6030ee10ba42cbca032ba457d6dc1efb Mon Sep 17 00:00:00 2001 From: Mathieu TUDISCO Date: Fri, 17 Apr 2020 11:44:51 +0200 Subject: [PATCH 1/2] Give the whole config access to plugins if needed. --- src/util/processPlugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/processPlugins.js b/src/util/processPlugins.js index c0404a2d9..bb58a3b8a 100644 --- a/src/util/processPlugins.js +++ b/src/util/processPlugins.js @@ -26,7 +26,7 @@ export default function(plugins, config) { const applyConfiguredPrefix = selector => { return prefixSelector(config.prefix, selector) } - const getConfigValue = (path, defaultValue) => _.get(config, path, defaultValue) + const getConfigValue = (path, defaultValue) => path ? _.get(config, path, defaultValue) : config plugins.forEach(plugin => { if (plugin.__isOptionsFunction) { From 2e7518a8855ad987a11f58ca6beed3b8830d7483 Mon Sep 17 00:00:00 2001 From: Mathieu TUDISCO Date: Fri, 17 Apr 2020 11:52:43 +0200 Subject: [PATCH 2/2] Make eslint happy --- src/util/processPlugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/processPlugins.js b/src/util/processPlugins.js index bb58a3b8a..5cb65c6f6 100644 --- a/src/util/processPlugins.js +++ b/src/util/processPlugins.js @@ -26,7 +26,7 @@ export default function(plugins, config) { const applyConfiguredPrefix = selector => { return prefixSelector(config.prefix, selector) } - const getConfigValue = (path, defaultValue) => path ? _.get(config, path, defaultValue) : config + const getConfigValue = (path, defaultValue) => (path ? _.get(config, path, defaultValue) : config) plugins.forEach(plugin => { if (plugin.__isOptionsFunction) {