plugins: do not reload a plugin if the change in its settings was to disable it

This commit is contained in:
sedum 2023-12-31 14:18:03 +01:00
parent ac6bb9ca80
commit a5e108c86f

View file

@ -134,7 +134,8 @@ const settingsController = {
try {
const pluginController = require('./plugins')
pluginController.unloadPlugin(pluginName)
pluginController.loadPlugin(pluginName)
// Do not reload the plugin if the change in its settings was to disable it
value.enable && pluginController.loadPlugin(pluginName)
} catch (e) {
log.error(e)
}