Commit b042c48f authored by Shpuld Shpludson's avatar Shpuld Shpludson

Fix TypeError crash when using url of an invalid user

parent 4185452b
......@@ -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