From 10f7d74600cc50633dcc49a0ab36795a1ce873ac Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 21 Dec 2022 15:31:18 +0100 Subject: [PATCH] Fix Plerooma search crash Potentially could be crashing in other scenarios where history data is missing --- src/components/Hashtag.tsx | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/components/Hashtag.tsx b/src/components/Hashtag.tsx index 90ab7ef7..07b3c029 100644 --- a/src/components/Hashtag.tsx +++ b/src/components/Hashtag.tsx @@ -52,22 +52,24 @@ const ComponentHashtag: React.FC = ({ > #{hashtag.name} - setHeight(height)} - > - parseInt(h.uses)).reverse()} - width={width} - height={height} - margin={children ? StyleConstants.Spacing.S : undefined} - /> - {children} - + {hashtag.history?.length ? ( + setHeight(height)} + > + parseInt(h.uses)).reverse()} + width={width} + height={height} + margin={children ? StyleConstants.Spacing.S : undefined} + /> + {children} + + ) : null} ) }