diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-24 03:02:05 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-09-04 10:48:54 +0200 |
commit | 5c146b16bc348e8f68044dec74e7b1694e55d2b8 (patch) | |
tree | a231c6b971714f3a67e0fdb99339f8c8146b55ac /src/util/plugin/PluginConfig.ts | |
parent | Minor fixes (diff) | |
download | server-dev/rory/legacy/plugins.tar.xz |
prettier dev/rory/legacy/plugins
Diffstat (limited to 'src/util/plugin/PluginConfig.ts')
-rw-r--r-- | src/util/plugin/PluginConfig.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/util/plugin/PluginConfig.ts b/src/util/plugin/PluginConfig.ts index b9c8aef0..17ec172c 100644 --- a/src/util/plugin/PluginConfig.ts +++ b/src/util/plugin/PluginConfig.ts @@ -57,12 +57,14 @@ function applyConfig(val: any) { if (!pair) pair = new PluginConfigEntity(); pair.key = key; - pair.value = obj; - if (!pair.key || pair.key == null) { - console.log(`[PluginConfig] WARN: Empty key`); - console.log(pair); - if (Environment.isDebug) debugger; - } else return pair.save(); + if (pair.value != obj) { + pair.value = obj; + if (!pair.key || pair.key == null) { + console.log(`[PluginConfig] WARN: Empty key`); + console.log(pair); + if (Environment.isDebug) debugger; + } else return pair.save(); + } } if (process.env.PLUGIN_CONFIG_PATH) { if (Environment.isDebug) console.log(`Writing config: ${process.env.PLUGIN_CONFIG_PATH}`); |