diff --git a/package-lock.json b/package-lock.json index 8264acaa8..57762e680 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cohort360_react", - "version": "2.20.4", + "version": "2.20.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cohort360_react", - "version": "2.20.4", + "version": "2.20.5", "dependencies": { "@apollo/client": "^3.7.0", "@apollo/react-hooks": "^4.0.0", diff --git a/package.json b/package.json index e8f677479..2339f061a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cohort360_react", - "version": "2.20.4", + "version": "2.20.5", "private": true, "dependencies": { "@apollo/client": "^3.7.0", diff --git a/src/services/aphp/servicePerimeters.ts b/src/services/aphp/servicePerimeters.ts index 364b7c016..e6cc86bf6 100644 --- a/src/services/aphp/servicePerimeters.ts +++ b/src/services/aphp/servicePerimeters.ts @@ -264,7 +264,7 @@ const servicesPerimeters: IServicePerimeters = { perimetersList = perimetersListReponse.data.results.map((perimeterItem: any) => { let read_access = undefined if (!defaultPerimetersIds) { - const foundRight = rightsData.results.find( + const foundRight = rightsData?.results?.find( (rightData: any) => rightData.perimeter.id === +(perimeterItem.perimeter.id ?? '0') ) read_access = foundRight?.right_read_patient_nominative ? 'DATA_NOMINATIVE' : 'DATA_PSEUDOANONYMISED'