Skip to content

Commit 28653ce

Browse files
committed
Protect Meets Core: Fix "0" rendered by conditional render chain (#40882)
1 parent 7a8f206 commit 28653ce

File tree

1 file changed

+2
-2
lines changed
  • projects/plugins/protect/src/js/routes/scan

1 file changed

+2
-2
lines changed

projects/plugins/protect/src/js/routes/scan/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const ScanPage = () => {
3535
currentScanStatus = 'active';
3636
}
3737

38-
const hasActiveThreats = status && status.threats.length;
39-
const hasHistory = history && history.threats.length;
38+
const hasActiveThreats = status && !! status.threats.length;
39+
const hasHistory = history && !! history.threats.length;
4040
const showResults = hasActiveThreats || hasHistory;
4141

4242
// Track view for Protect admin page.

0 commit comments

Comments
 (0)