Merge branch 'fix/user-by-name-type-error' into 'develop'
Fix TypeError crash when using url of an invalid user See merge request pleroma/pleroma-fe!493
This commit is contained in:
commit
0e5fe7504f
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