1
0
Fork 0

Fix SAC handling empty dataset

This commit is contained in:
Gregory Eremin 2015-03-18 16:35:54 +07:00
parent d88933eed9
commit e38c766241
1 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,9 @@ var StackedAreaChart = React.createClass({
var weeksList = _(this.state.rawData).pluck('week').uniq().sort().reverse().take(this.maxWeeks).value();
if (weeksList.length < 2) {
this.setState({
weeks: [],
topItems: [],
weeklyData: {},
maxCommitsPerWeek: 0,
state: 'pleaseRender'
});
return;