Commit 0e5fe750 authored by lain's avatar lain

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
parents 4185452b b042c48f
......@@ -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 = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment