forked from AkkomaGang/akkoma-fe
Fix: Change condition
This commit is contained in:
parent
26955af60b
commit
e6f9b1517b
1 changed files with 3 additions and 3 deletions
|
@ -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 })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue