From e4b1a196ae685a490baf561224107952c610c1f5 Mon Sep 17 00:00:00 2001 From: Etorix <92535668+EtorixDev@users.noreply.github.com> Date: Tue, 17 Jun 2025 18:55:10 -0700 Subject: [PATCH] fix Settings::onChange being fired twice (#3496) --- src/shared/SettingsStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/SettingsStore.ts b/src/shared/SettingsStore.ts index 0b6aa25b..1d7dc7f6 100644 --- a/src/shared/SettingsStore.ts +++ b/src/shared/SettingsStore.ts @@ -160,7 +160,7 @@ export class SettingsStore { // So, we need to extract the top-level setting path (plugins.pluginName.settingName), // to be able to notify globalListeners and top-level setting name listeners (let { settingName } = settings.use(["settingName"]), // with the new value - if (paths.length > 2 && paths[0] === "plugins") { + if (paths.length > 3 && paths[0] === "plugins") { const settingPath = paths.slice(0, 3); const settingPathStr = settingPath.join("."); const settingValue = settingPath.reduce((acc, curr) => acc[curr], root);