forked from AkkomaGang/akkoma-fe
Fix TypeError crash when using url of an invalid user
This commit is contained in:
parent
4185452b52
commit
b042c48fa7
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,9 @@ export const getters = {
|
|||
userById: state => id =>
|
||||
state.users.find(user => user.id === id),
|
||||
userByName: state => name =>
|
||||
state.users.find(user => user.screen_name.toLowerCase() === name.toLowerCase())
|
||||
state.users.find(user => user.screen_name &&
|
||||
(user.screen_name.toLowerCase() === name.toLowerCase())
|
||||
)
|
||||
}
|
||||
|
||||
export const defaultState = {
|
||||
|
|
Loading…
Reference in a new issue