From 2c868a42c68147f17a5755653879868bfd8e4096 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 9 Aug 2022 02:32:58 +0100 Subject: [PATCH] fix loading of user statuses --- src/components/Status/index.vue | 1 + src/store/modules/userProfile.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Status/index.vue b/src/components/Status/index.vue index f2b071c2..09115d92 100644 --- a/src/components/Status/index.vue +++ b/src/components/Status/index.vue @@ -182,6 +182,7 @@ export default { }, methods: { capitalizeFirstLetter(str) { + if (!str) return '' return str.charAt(0).toUpperCase() + str.slice(1) }, changeStatus(statusId, isSensitive, visibility) { diff --git a/src/store/modules/userProfile.js b/src/store/modules/userProfile.js index 0cdc0df6..85bdfb7e 100644 --- a/src/store/modules/userProfile.js +++ b/src/store/modules/userProfile.js @@ -39,7 +39,7 @@ const userProfile = { commit('SET_STATUSES_LOADING', true) fetchUserStatuses(userId, getters.authHost, godmode, getters.token) - .then(statuses => dispatch('SetStatuses', statuses.data)) + .then(statuses => dispatch('SetStatuses', statuses.data.activities)) commit('SET_STATUSES_LOADING', false) },