diff --git a/src/pages/PageProfile.vue b/src/pages/PageProfile.vue index 18ca4d0..3e946cc 100644 --- a/src/pages/PageProfile.vue +++ b/src/pages/PageProfile.vue @@ -56,7 +56,8 @@ } }, created () { - this.$store.dispatch('posts/fetchPosts', {ids: this.user.posts}) + const userPostsIds = this.user.posts || [] + this.$store.dispatch('posts/fetchPosts', {ids: userPostsIds}) .then(() => this.asyncDataStatus_fetched()) } }