aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/preferences/mod.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-16 17:16:38 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-16 17:16:38 +0200
commit969444b32101a45d5917a3947b94bb09c3fc01a1 (patch)
treeac6d17ad6f3a1535c619aef9eba83179cd4c0878 /client-web/source/preferences/mod.ts
parentff2329cac03703a10ce8b3793d707131403318b4 (diff)
downloadkeks-meet-969444b32101a45d5917a3947b94bb09c3fc01a1.tar
keks-meet-969444b32101a45d5917a3947b94bb09c3fc01a1.tar.bz2
keks-meet-969444b32101a45d5917a3947b94bb09c3fc01a1.tar.zst
optional channels (1)
Diffstat (limited to 'client-web/source/preferences/mod.ts')
-rw-r--r--client-web/source/preferences/mod.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/client-web/source/preferences/mod.ts b/client-web/source/preferences/mod.ts
index f4fa551..ecff8fa 100644
--- a/client-web/source/preferences/mod.ts
+++ b/client-web/source/preferences/mod.ts
@@ -18,7 +18,7 @@ type TypeMapper = { "string": string, "number": number, "boolean": boolean }
type PrefMap<T extends { [key: string]: { type: unknown } }> = { [Key in keyof T]: T[Key]["type"] }
type Optional<T extends { [key: string]: unknown }> = { [Key in keyof T]?: T[Key] }
export const { prefs: PREFS, explicit: PREFS_EXPLICIT } = register_prefs(PREF_DECLS)
-const pref_change_handlers: Map<keyof typeof PREFS, Set<() => unknown>> = new Map()
+const pref_change_handlers: Map<keyof typeof PREFS, Map<() => unknown>> = new Map()
export const on_pref_changed = (key: keyof typeof PREFS, cb: () => unknown): (() => void) => {
const m = (pref_change_handlers.get(key)
?? (() => {