fix: add_account was not saving config immediately
Massimo Melina committed
Apr 19, 2024 at 14:04 UTC
1afb7eb41fa04454f2b937903857c9df8c53c676
1 file changed
+1
src/perm.ts
+1
@@ -148,6 +148,7 @@ export function addAccount(username: string, props: Partial<Account>) {
148
const copy: Account = setHidden(_.pickBy(props, Boolean), { username }) // have the field in the object but hidden so that stringification won't include it
149
accountsConfig.set(accounts =>
150
Object.assign(accounts, { [username]: copy }))
151
+ saveAccountsAsap()
152
return copy
153
}
154