Просмотр исходного кода

Merge pull request #1484 from porter-dev/nico/fix-bad-logic-showing-0

[BUGFIX] Falsy logic showing 0 on logs card
Nicolas Frati 4 лет назад
Родитель
Сommit
ef171238e0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      dashboard/src/components/events/sub-events/LogBucketCard.tsx

+ 1 - 1
dashboard/src/components/events/sub-events/LogBucketCard.tsx

@@ -77,7 +77,7 @@ const LogBucketCard: React.FunctionComponent<LogBucketCardProps> = ({
           {/* Case: No logs found after the api call */}
           {!isLoading && !logs?.length && <Loading>No logs found.</Loading>}
           {/* Case: Logs were found successfully  */}
-          {!isLoading && logs?.length && logs?.map((l) => <Log>{l}</Log>)}
+          {!isLoading && !!logs?.length && logs?.map((l) => <Log>{l}</Log>)}
         </>
       )}
     </StyledCard>