Use "-1" in indexOf
This commit is contained in:
parent
24caa2cfcd
commit
7ffb7e6795
@ -5,6 +5,6 @@ const generateProfileLink = (user, name = '') => {
|
|||||||
return { ...baseLinkParams, params: (isExternal(user) ? { id } : { name }) }
|
return { ...baseLinkParams, params: (isExternal(user) ? { id } : { name }) }
|
||||||
}
|
}
|
||||||
|
|
||||||
const isExternal = ({screen_name}) => (screen_name.indexOf('@') > 0)
|
const isExternal = ({screen_name}) => (screen_name.indexOf('@') > -1)
|
||||||
|
|
||||||
export default generateProfileLink
|
export default generateProfileLink
|
||||||
|
Loading…
Reference in New Issue
Block a user