diff options
| author | shpuld <shp@cock.li> | 2019-07-07 22:23:04 +0300 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2019-07-07 22:23:04 +0300 |
| commit | e5879e3d4d26f6e98e80208b6df5577971989972 (patch) | |
| tree | ce57791a01988966ad798168e0bbc7b806620732 /src | |
| parent | 54b0f9013388b24769c587abbf7ca76849ce9570 (diff) | |
check for user before checking users props
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/status/status.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 199351cb..4b3499cd 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) { |
