From ab99d5ef952998cfe277dfbb32dd9fe238c91f48 Mon Sep 17 00:00:00 2001 From: jasper Date: Tue, 26 Mar 2019 13:35:08 -0700 Subject: [PATCH] Fix warnings in user profile routing --- src/components/basic_user_card/basic_user_card.js | 1 + .../user_profile_link_generator.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/basic_user_card/basic_user_card.js b/src/components/basic_user_card/basic_user_card.js index 87085a28..a80e6cf0 100644 --- a/src/components/basic_user_card/basic_user_card.js +++ b/src/components/basic_user_card/basic_user_card.js @@ -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) } } diff --git a/src/services/user_profile_link_generator/user_profile_link_generator.js b/src/services/user_profile_link_generator/user_profile_link_generator.js index a214ca48..5b430328 100644 --- a/src/services/user_profile_link_generator/user_profile_link_generator.js +++ b/src/services/user_profile_link_generator/user_profile_link_generator.js @@ -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 }) } }