30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
diff --git a/lib/util/customConfig.js b/lib/util/customConfig.js
|
|
index 1ab15994a1e236b11fe8f3fd03404cea32c7099c..cc946deb2b6280738ee96346fcc85cb0f67f181b 100644
|
|
--- a/lib/util/customConfig.js
|
|
+++ b/lib/util/customConfig.js
|
|
@@ -48,7 +48,7 @@ function loadConfig(config) {
|
|
if (stats === null) {
|
|
// Default to no config
|
|
loadedConfig = {};
|
|
- } else if (lastModifiedDate !== mtime) {
|
|
+ } else if (lastModifiedDate !== mtime || previousConfig !== config) {
|
|
// Load the config based on path
|
|
lastModifiedDate = mtime;
|
|
loadedConfig = requireUncached(resolvedPath);
|
|
@@ -86,13 +86,13 @@ function resolve(twConfig) {
|
|
const now = Date.now();
|
|
const expired = now - lastCheck > CHECK_REFRESH_RATE;
|
|
if (newConfig || expired) {
|
|
- previousConfig = twConfig;
|
|
- lastCheck = now;
|
|
const userConfig = loadConfig(twConfig);
|
|
// userConfig is null when config file was not modified
|
|
if (userConfig !== null) {
|
|
mergedConfig = resolveConfig(userConfig);
|
|
}
|
|
+ previousConfig = twConfig;
|
|
+ lastCheck = now;
|
|
}
|
|
return mergedConfig;
|
|
}
|