summaryrefslogtreecommitdiff
path: root/client/chart
diff options
context:
space:
mode:
Diffstat (limited to 'client/chart')
-rw-r--r--client/chart/countriesByYear.chart.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/chart/countriesByYear.chart.js b/client/chart/countriesByYear.chart.js
index 2284f774..78ab4434 100644
--- a/client/chart/countriesByYear.chart.js
+++ b/client/chart/countriesByYear.chart.js
@@ -68,11 +68,13 @@ class CountriesByYearChart extends Component {
)
)
- citationCountsByYear.push(
- [otherCountriesLabel].concat(
- yearList.map(year => otherCountries.reduce((a,b) => (a + years[year][b]), 0))
+ if (otherCountries.length) {
+ citationCountsByYear.push(
+ [otherCountriesLabel].concat(
+ yearList.map(year => otherCountries.reduce((a,b) => (a + years[year][b]), 0))
+ )
)
- )
+ }
let maxCitationsInAYear = 0
let currentSum = 0