Add defensive code to makeGetPostsInChannel to avoid panic (#24510)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6109330beb
Коммит
7e0d9110ed
@@ -296,7 +296,7 @@ export function makeGetPostsInChannel(): (state: GlobalState, channelId: Channel
|
|||||||
for (let i = 0; i < postIds.length; i++) {
|
for (let i = 0; i < postIds.length; i++) {
|
||||||
const post = allPosts[postIds[i]];
|
const post = allPosts[postIds[i]];
|
||||||
|
|
||||||
if (shouldFilterJoinLeavePost(post, showJoinLeave, currentUser ? currentUser.username : '')) {
|
if (!post || shouldFilterJoinLeavePost(post, showJoinLeave, currentUser ? currentUser.username : '')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user