davidpomerenke commited on
Commit
71ab1e9
Β·
verified Β·
1 Parent(s): 3665390

Upload from GitHub Actions: fixed Type Error

Browse files
frontend/src/components/WorldMap.js CHANGED
@@ -26,10 +26,10 @@ const makeTitle = data => d => {
26
  a =>
27
  `${smoothProgressBar(a.population / pop)} ${
28
  a.name
29
- } – ${a.score.toFixed(2)}`
30
  )
31
  .join('\n\n') + (languages?.length > 10 ? `\n\n...` : '')
32
- return `${d.properties.ADMIN} – ${cData?.score.toFixed(2)}\n\n${langstring}`
33
  }
34
 
35
  const WorldMap = ({ data, width = 750, height = 500 }) => {
 
26
  a =>
27
  `${smoothProgressBar(a.population / pop)} ${
28
  a.name
29
+ } – ${a.score === null || a.score === undefined ? "n/a" : a.score.toFixed(2)}`
30
  )
31
  .join('\n\n') + (languages?.length > 10 ? `\n\n...` : '')
32
+ return `${d.properties.ADMIN} – ${cData?.score === null || cData?.score === undefined ? "n/a" : cData.score.toFixed(2)}\n\n${langstring}`
33
  }
34
 
35
  const WorldMap = ({ data, width = 750, height = 500 }) => {