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 }) => {
|