diff --git a/client/src/pages/country/components/export.js b/client/src/pages/country/components/export.js index 6ff6a1c..58c694f 100644 --- a/client/src/pages/country/components/export.js +++ b/client/src/pages/country/components/export.js @@ -37,7 +37,7 @@ export default function ExportPage() { policyBlocs.push(dataAnalyse.find((el) => (el.fields.codethematique === 'A3'))?.fields || null); policyBlocs.push(dataAnalyse.find((el) => (el.fields.codethematique === 'A4'))?.fields || null); dataES = dataAnalyse.find((el) => (el.fields.codethematique === 'A5'))?.fields || null; - dataRI = dataAnalyse.find((el) => (el.fields.codethematique === 'A6')).fields || null; + dataRI = dataAnalyse.find((el) => (el.fields.codethematique === 'A6'))?.fields || null; cooperationBlocs.push(dataAnalyse.find((el) => (el.fields.codethematique === 'A7'))?.fields || null); cooperationBlocs.push(dataAnalyse.find((el) => (el.fields.codethematique === 'A8'))?.fields || null); diff --git a/client/src/pages/country/components/research/index.js b/client/src/pages/country/components/research/index.js index 2f02ef0..68e074b 100644 --- a/client/src/pages/country/components/research/index.js +++ b/client/src/pages/country/components/research/index.js @@ -25,7 +25,7 @@ export default function CountryResearchPage() { const charts2nd = charts.filter((indic) => indic.theme === 'personnel'); if (data.length !== 0) { - dataRI = data.find((el) => (el.fields.codethematique === 'A6')).fields || null; + dataRI = data.find((el) => (el.fields.codethematique === 'A6'))?.fields || null; } else { dataRI = ''; }