From ee8ae2c1ca22f9ebfabaa9707b9186e35da7d810 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Sat, 11 Nov 2023 12:13:07 +0000 Subject: [PATCH] fix --- src/modules/config-editor/config-editor.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/config-editor/config-editor.service.ts b/src/modules/config-editor/config-editor.service.ts index 4150e1fd3..4da4e6641 100644 --- a/src/modules/config-editor/config-editor.service.ts +++ b/src/modules/config-editor/config-editor.service.ts @@ -286,9 +286,11 @@ export class ConfigEditorService { const idx = config.disabledPlugins.findIndex(x => x === pluginName); - config.disabledPlugins.splice(idx, 1); - - await this.updateConfigFile(config); + // Check plugin is in thw list + if (idx > -1) { + config.disabledPlugins.splice(idx, 1); + await this.updateConfigFile(config); + } return config.disabledPlugins; }