Fix warnings in user profile routing
This commit is contained in:
parent
987b5162a7
commit
ab99d5ef95
@ -20,6 +20,7 @@ const BasicUserCard = {
|
||||
this.userExpanded = !this.userExpanded
|
||||
},
|
||||
userProfileLink (user) {
|
||||
console.log('22222222222222222222222222222')
|
||||
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,8 @@ import { includes } from 'lodash'
|
||||
const generateProfileLink = (id, screenName, restrictedNicknames) => {
|
||||
const complicated = (isExternal(screenName) || includes(restrictedNicknames, screenName))
|
||||
return {
|
||||
name: (complicated ? 'external-user-profile' : 'user-profile'),
|
||||
params: (complicated ? { id } : { name: screenName })
|
||||
name: (!screenName || complicated ? 'external-user-profile' : 'user-profile'),
|
||||
params: (!screenName || complicated ? { id } : { name: screenName })
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user