mirror of
https://git.pleroma.social/sjw/pleroma-fe.git
synced 2024-12-23 15:05:04 +01:00
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
@ -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 New Issue
Block a user