Use "-1" in indexOf

This commit is contained in:
Maxim Filippov 2018-12-13 13:51:47 +03:00
parent 24caa2cfcd
commit 7ffb7e6795

View file

@ -5,6 +5,6 @@ const generateProfileLink = (user, 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