Fix warnings in user profile routing
This commit is contained in:
parent
987b5162a7
commit
ab99d5ef95
2 changed files with 3 additions and 2 deletions
|
@ -20,6 +20,7 @@ const BasicUserCard = {
|
||||||
this.userExpanded = !this.userExpanded
|
this.userExpanded = !this.userExpanded
|
||||||
},
|
},
|
||||||
userProfileLink (user) {
|
userProfileLink (user) {
|
||||||
|
console.log('22222222222222222222222222222')
|
||||||
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
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 generateProfileLink = (id, screenName, restrictedNicknames) => {
|
||||||
const complicated = (isExternal(screenName) || includes(restrictedNicknames, screenName))
|
const complicated = (isExternal(screenName) || includes(restrictedNicknames, screenName))
|
||||||
return {
|
return {
|
||||||
name: (complicated ? 'external-user-profile' : 'user-profile'),
|
name: (!screenName || complicated ? 'external-user-profile' : 'user-profile'),
|
||||||
params: (complicated ? { id } : { name: screenName })
|
params: (!screenName || complicated ? { id } : { name: screenName })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue