duplicated entries in the console log at start

Massimo Melina committed Jan 2, 2022 at 23:39 UTC 9fc08476a239ef976c9b1e2f0d1f6eacd00b2a66
1 file changed +3 -1
src/config.ts
+3 -1
@@ -30,8 +30,10 @@ export function subscribe(k:string, cb:(v:any,was?:any)=>void, defaultValue?:any
30 if (a !== undefined)
31 return cb(caster ? caster(a) : a)
32 emitter.on('new.'+k, cb)
33 - if (defaultValue !== undefined)
33 + if (defaultValue !== undefined) {
34 + state[k] = defaultValue
35 cb(defaultValue)
36 + }
37 }
38
39 export function getConfig(k:string) {