Procházet zdrojové kódy

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

[BUGFIX] Falsy logic showing 0 on logs card
Nicolas Frati před 4 roky
rodič
revize
ef171238e0

+ 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 */}
           {/* Case: No logs found after the api call */}
           {!isLoading && !logs?.length && <Loading>No logs found.</Loading>}
           {!isLoading && !logs?.length && <Loading>No logs found.</Loading>}
           {/* Case: Logs were found successfully  */}
           {/* Case: Logs were found successfully  */}
-          {!isLoading && logs?.length && logs?.map((l) => <Log>{l}</Log>)}
+          {!isLoading && !!logs?.length && logs?.map((l) => <Log>{l}</Log>)}
         </>
         </>
       )}
       )}
     </StyledCard>
     </StyledCard>