Fixing deleting messages in permalink view (#4958)

Этот коммит содержится в:
Christopher Speller
2017-01-04 14:23:41 -05:00
коммит произвёл Harrison Healey
родитель bf9a8e4b1f
Коммит 60a59a67fe

Просмотреть файл

@@ -316,13 +316,18 @@ class PostStoreClass extends EventEmitter {
}
deletePost(post) {
const postInfo = this.postsInfo[post.channel_id];
let postInfo = null;
if (this.currentFocusedPostId == null) {
postInfo = this.postsInfo[post.channel_id];
} else {
postInfo = this.postsInfo[this.currentFocusedPostId];
}
if (!postInfo) {
// the post that has been deleted is in a channel that we haven't seen so just ignore it
return;
}
const postList = this.postsInfo[post.channel_id].postList;
const postList = postInfo.postList;
if (isPostListNull(postList)) {
return;