From 3eb0eb42891a6aeea7456aadfcbb46e9f4f97a7d Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Wed, 22 May 2024 11:47:13 +0100 Subject: [PATCH] refactor: Fix syntax error in MonitorStep and CriteriaFilterUtil This commit fixes a syntax error in the MonitorStep and CriteriaFilterUtil files. In MonitorStep, the syntax error was caused by an extra semicolon (;) in the screenshotDataInBase64 assignment. In CriteriaFilterUtil, the return statement was incorrectly set to true instead of false. These changes ensure that the code is correct and functioning as intended. --- Dashboard/src/Components/Form/Monitor/MonitorStep.tsx | 4 ++-- Dashboard/src/Utils/Form/Monitor/CriteriaFilter.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dashboard/src/Components/Form/Monitor/MonitorStep.tsx b/Dashboard/src/Components/Form/Monitor/MonitorStep.tsx index f876c524ad..022ca725ad 100644 --- a/Dashboard/src/Components/Form/Monitor/MonitorStep.tsx +++ b/Dashboard/src/Components/Form/Monitor/MonitorStep.tsx @@ -105,8 +105,8 @@ const MonitorStepElement: FunctionComponent = ( const screenshots = []; const screenshot = { - screenshotDataInBase64: (await page.screenshot()).toString('base64'); // returns base64 encoded image - screenshotName: 'Playwright Screenshot'; + screenshotDataInBase64: (await page.screenshot()).toString('base64'), // returns base64 encoded image + screenshotName: 'Playwright Screenshot' }; // make sure you add it to screnshot array diff --git a/Dashboard/src/Utils/Form/Monitor/CriteriaFilter.ts b/Dashboard/src/Utils/Form/Monitor/CriteriaFilter.ts index c23d03a0de..71d57f527b 100644 --- a/Dashboard/src/Utils/Form/Monitor/CriteriaFilter.ts +++ b/Dashboard/src/Utils/Form/Monitor/CriteriaFilter.ts @@ -471,7 +471,7 @@ export default class CriteriaFilterUtil { return true; } - return true; + return false; } public static getDropdownOptionsByCheckOn(data: {