From fc039f8186afb1cbe719c31b11a550f099af469c Mon Sep 17 00:00:00 2001 From: Nick Funk Date: Wed, 28 Aug 2019 12:21:35 -0600 Subject: [PATCH] Filter null comments coming into moderation queues to prevent white screening (#2509) Wyatt and I are not sure why comments are coming back null, but this should keep the moderation area from blanking out when it errors handling nulled out comments crashing the queue. FIXME tag added with Wyatt/Nick as this is only a patching fix and does not resolve the underlying issue. --- .../admin/routes/Moderate/Queue/Queue.tsx | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/src/core/client/admin/routes/Moderate/Queue/Queue.tsx b/src/core/client/admin/routes/Moderate/Queue/Queue.tsx index 2b05e33c8..638e7f39b 100644 --- a/src/core/client/admin/routes/Moderate/Queue/Queue.tsx +++ b/src/core/client/admin/routes/Moderate/Queue/Queue.tsx @@ -71,26 +71,29 @@ const Queue: FunctionComponent = ({ )} - {comments.map(c => ( - - - - ))} + {comments + // FIXME (Nick/Wyatt): Investigate why comments are coming back null + .filter(c => Boolean(c)) + .map(c => ( + + + + ))} {hasMore && (