From e5879e3d4d26f6e98e80208b6df5577971989972 Mon Sep 17 00:00:00 2001 From: shpuld Date: Sun, 7 Jul 2019 22:23:04 +0300 Subject: [PATCH] check for user before checking users props --- src/components/status/status.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/status/status.js b/src/components/status/status.js index 199351cb8e..4b3499cd50 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -173,12 +173,13 @@ const Status = { if (this.status.type === 'retweet') { return false } - var checkFollowing = this.$store.state.config.replyVisibility === 'following' + const checkFollowing = this.$store.state.config.replyVisibility === 'following' for (var i = 0; i < this.status.attentions.length; ++i) { if (this.status.user.id === this.status.attentions[i].id) { continue } - if (checkFollowing && this.$store.getters.findUser(this.status.attentions[i].id).following) { + const taggedUser = this.$store.getters.findUser(this.status.attentions[i].id) + if (checkFollowing && taggedUser && taggedUser.following) { return false } if (this.status.attentions[i].id === this.$store.state.users.currentUser.id) {