Skip to content

Commit

Permalink
Fix output of zero length value when using length as conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller committed Jan 8, 2025
1 parent 060637b commit d16e565
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/plugins/protect/src/js/routes/scan/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const ScanPage = () => {
currentScanStatus = 'active';
}

const hasActiveThreats = status && status.threats.length;
const hasHistory = history && history.threats.length;
const hasActiveThreats = status && !! status.threats.length;
const hasHistory = history && !! history.threats.length;
const showResults = hasActiveThreats || hasHistory;

const filters = useMemo( () => {
Expand Down

0 comments on commit d16e565

Please sign in to comment.