From 8ea6206e7535eb3e12451034bd4728d6b457b941 Mon Sep 17 00:00:00 2001 From: Tony Valle Date: Thu, 24 Aug 2023 13:32:56 +0200 Subject: [PATCH] fix: incorrect expression --- .../components/TeiSearch/epics/teiSearch.epics.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_modules/capture-core/components/TeiSearch/epics/teiSearch.epics.js b/src/core_modules/capture-core/components/TeiSearch/epics/teiSearch.epics.js index 16b87ef4ff..dfb4c92533 100644 --- a/src/core_modules/capture-core/components/TeiSearch/epics/teiSearch.epics.js +++ b/src/core_modules/capture-core/components/TeiSearch/epics/teiSearch.epics.js @@ -34,9 +34,9 @@ import { getSearchFormId } from '../getSearchFormId'; import type { QuerySingleResource } from '../../../utils/api/api.types'; const getOuQueryArgs = (orgUnit: ?Object, orgUnitScope: string) => - (orgUnitScope !== 'ACCESSIBLE' || 'CAPTURE' || 'ALL' ? - { ou: orgUnit && orgUnit.id, ouMode: orgUnitScope } : - { ouMode: orgUnitScope }); + (['ACCESSIBLE', 'CAPTURE', 'ALL'].includes(orgUnitScope) ? + { ouMode: orgUnitScope } : + { ou: orgUnit && orgUnit.id, ouMode: orgUnitScope }); const getContextQueryArgs = (programId: ?string, trackedEntityTypeId: string) => (programId ? { program: programId } : { trackedEntityType: trackedEntityTypeId });