From 93b0c34f07fc4157c16196c02835c81b78705c14 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Tue, 16 Apr 2019 16:36:43 +0300 Subject: [PATCH] Fixed comparison to be !== and not != also, fixed the same issue for machine-related issues and added documentation. --- .../cc/ui/src/components/pages/ReportPage.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js b/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js index 873d31253..43be6367c 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js @@ -404,14 +404,17 @@ class ReportPageComponent extends AuthComponent { generateReportRecommendationsSection() { return (
- {Object.keys(this.state.report.recommendations.domain_issues).length !=0 ? + {/* Checks if there are any domain issues. If there are more then one: render the title. Otherwise, + * don't render it (since the issues themselves will be empty. */} + {Object.keys(this.state.report.recommendations.domain_issues).length !== 0 ?

Domain related recommendations

: null }
{this.generateIssues(this.state.report.recommendations.domain_issues)}
-

- Machine related Recommendations -

+ {/* Checks if there are any issues. If there are more then one: render the title. Otherwise, + * don't render it (since the issues themselves will be empty. */} + {Object.keys(this.state.report.recommendations.issues).length !== 0 ? +

Machine related recommendations

: null }
{this.generateIssues(this.state.report.recommendations.issues)}