aboutsummaryrefslogtreecommitdiff
path: root/src/api/settings.ts
diff options
context:
space:
mode:
authorPhil <letsphil12@gmail.com>2023-03-28 20:26:57 +0200
committerGitHub <noreply@github.com>2023-03-28 18:26:57 +0000
commit420b06809432e90a82d2d957fd54e3698dcf9c20 (patch)
treea9215834d3a400777aa4434d16e32b0825ce20b5 /src/api/settings.ts
parentee943c428431bd26e4a00b02c3c68bd9a4535a6a (diff)
downloadVencord-420b06809432e90a82d2d957fd54e3698dcf9c20.tar.gz
Vencord-420b06809432e90a82d2d957fd54e3698dcf9c20.tar.bz2
Vencord-420b06809432e90a82d2d957fd54e3698dcf9c20.zip
Fix makeProxy returning stale proxies after assigning objects (#722)
Diffstat (limited to 'src/api/settings.ts')
-rw-r--r--src/api/settings.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/api/settings.ts b/src/api/settings.ts
index 0ebfe1d..0aaa490 100644
--- a/src/api/settings.ts
+++ b/src/api/settings.ts
@@ -133,6 +133,7 @@ function makeProxy(settings: any, root = settings, path = ""): Settings {
target[p] = v;
// Call any listeners that are listening to a setting of this path
const setPath = `${path}${path && "."}${p}`;
+ delete proxyCache[setPath];
for (const subscription of subscriptions) {
if (!subscription._path || subscription._path === setPath) {
subscription(v, setPath);