fix: Fix if vote is undefined
This commit is contained in:
1 parent
ff3246c0a6
commit
5f4c32fe2c
4 files changed
+25
-7
No files matched your search
@@ -77,11 +77,8 @@ authData.subscribe(async (data) => {
|
||||
const site = await getClient().getSite({
|
||||
auth: data.token,
|
||||
})
|
||||
|
||||
if (!site?.my_user) throw Error('Missing user')
|
||||
|
||||
user.set({ ...site.my_user.local_user_view, unreads: 0 })
|
||||
|
||||
if (typeof localStorage != 'undefined') {
|
||||
localStorage.setItem('user', JSON.stringify(data))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user