mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-02-01 01:47:01 +01:00
refs #816 Fix visibility detector when the response does not contain default visibility
This commit is contained in:
parent
f9653647e4
commit
d662735729
@ -368,7 +368,7 @@ const actions: ActionTree<NewTootState, RootState> = {
|
||||
)
|
||||
const res = await client.verifyAccountCredentials()
|
||||
const visibility: VisibilityType | undefined = (Object.values(Visibility) as Array<VisibilityType>).find(v => {
|
||||
return v.key === res.data.source!.privacy
|
||||
return res.data.source !== undefined && v.key === res.data.source.privacy
|
||||
})
|
||||
if (visibility === undefined) {
|
||||
throw new Error('Visibility value is invalid')
|
||||
|
Loading…
x
Reference in New Issue
Block a user