From a43c1479c8ae2f7e650bcbfc3926f243125dbe03 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Fri, 1 Apr 2022 20:10:38 +0530 Subject: [PATCH] UI: Fix eslint errors --- monkey/monkey_island/cc/ui/src/components/pages/MapPage.js | 2 +- .../report-components/attack/ReportMatrixComponent.js | 2 +- .../components/report-components/security/PostBreachParser.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js index fa782eac7..ebe5b8cc6 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js @@ -92,7 +92,7 @@ class MapPageComponent extends AuthComponent { body: JSON.stringify({kill_time: Date.now() / 1000.0}) }) .then(res => res.json()) - .then(res => {this.setState({killPressed: true})}); + .then(_res => {this.setState({killPressed: true})}); }; renderKillDialogModal = () => { diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrixComponent.js b/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrixComponent.js index 00420f095..51d349b30 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrixComponent.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrixComponent.js @@ -53,7 +53,7 @@ class ReportMatrixComponent extends React.Component { } renderTechnique(technique) { - if (technique == null || typeof technique === undefined) { + if (technique == null || typeof technique === 'undefined') { return (
) } else { return ( diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/security/PostBreachParser.js b/monkey/monkey_island/cc/ui/src/components/report-components/security/PostBreachParser.js index 39308e102..8157aa78a 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/security/PostBreachParser.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/security/PostBreachParser.js @@ -50,7 +50,7 @@ function aggregateMultipleResultsPba(results) { for (let i = 0; i < results.length; i++) { if (multipleResultsPbas.includes(results[i].name)) aggregateResults(results[i]); - if ((results[i].name === PROCESS_LIST_COLLECTION) && (typeof results[i].result[0] !== "string")) + if ((results[i].name === PROCESS_LIST_COLLECTION) && (typeof results[i].result[0] !== 'string')) modifyProcessListCollectionResult(results[i].result); }