Fix: Change condition

This commit is contained in:
jasper 2019-03-28 18:43:03 -07:00
parent 26955af60b
commit e6f9b1517b
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
import { includes } from 'lodash'
const generateProfileLink = (id, screenName, restrictedNicknames) => {
const complicated = (isExternal(screenName) || includes(restrictedNicknames, screenName))
const complicated = !screenName || (isExternal(screenName) || includes(restrictedNicknames, screenName))
return {
name: (!screenName || complicated ? 'external-user-profile' : 'user-profile'),
params: (!screenName || complicated ? { id } : { name: screenName })
name: (complicated ? 'external-user-profile' : 'user-profile'),
params: (complicated ? { id } : { name: screenName })
}
}