Fix warnings in user profile routing

This commit is contained in:
jasper 2019-03-26 13:35:08 -07:00
parent 987b5162a7
commit ab99d5ef95
2 changed files with 3 additions and 2 deletions

View File

@ -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)
}
}

View File

@ -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 })
}
}