mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-30 00:41:12 +00:00
Fix a bug with null session key
This commit is contained in:
parent
22b275dd20
commit
af37501ec1
@ -55,4 +55,10 @@ export const publishSettings = async (updates: Record<string, any>) => {
|
|||||||
|
|
||||||
export const updateSession = (k, f) => sessions.update($s => ({...$s, [k]: f($s[k])}))
|
export const updateSession = (k, f) => sessions.update($s => ({...$s, [k]: f($s[k])}))
|
||||||
|
|
||||||
export const updateCurrentSession = f => updateSession(pubkey.get(), f)
|
export const updateCurrentSession = f => {
|
||||||
|
const $pubkey = pubkey.get()
|
||||||
|
|
||||||
|
if ($pubkey) {
|
||||||
|
updateSession($pubkey, f)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user