diff --git a/src/components/FriendButton.vue b/src/components/FriendButton.vue index af6b825..29cebe1 100644 --- a/src/components/FriendButton.vue +++ b/src/components/FriendButton.vue @@ -17,6 +17,7 @@ const connectionsStore = useConnectionsStore(); const rootStore = useRootStore(); const isFollowing = computed(() => connectionsStore.getFollowStatus(store.id, props.authorid)); +const checkFollow = computed(() => connectionsStore.getFollowingStatus(store.id, props.authorid)); function handleFollowUnfollow() { if (store.$state.id === ``) { @@ -51,7 +52,7 @@ function handleFollowUnfollow() { {{ checkFollow ? `Follow back` : `Follow` }}
(me: string, them: string) => { + if (me === ``) { + return false; + } + const checkFollowing = state.profiles.get(them)?.following?.has(me); + return checkFollowing; + }, getConnections: (state: Connections) => (id: string) => { return state.profiles.get(id); },