mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-29 16:34:25 -04:00
fix Settings::onChange being fired twice (#3496)
This commit is contained in:
parent
7779e5a1ec
commit
e4b1a196ae
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ export class SettingsStore<T extends object> {
|
||||||
// So, we need to extract the top-level setting path (plugins.pluginName.settingName),
|
// 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"]),
|
// to be able to notify globalListeners and top-level setting name listeners (let { settingName } = settings.use(["settingName"]),
|
||||||
// with the new value
|
// 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 settingPath = paths.slice(0, 3);
|
||||||
const settingPathStr = settingPath.join(".");
|
const settingPathStr = settingPath.join(".");
|
||||||
const settingValue = settingPath.reduce((acc, curr) => acc[curr], root);
|
const settingValue = settingPath.reduce((acc, curr) => acc[curr], root);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue