[view/timeline,bugfix][xs]: timeline crashes if no entries so create placeholder entry for timeline if no entries from data.
This commit is contained in:
parent
530ebc44a2
commit
915f00e21a
@ -92,6 +92,14 @@ my.Timeline = Backbone.View.extend({
|
||||
out.timeline.date.push(tlEntry);
|
||||
}
|
||||
});
|
||||
// if no entries create a placeholder entry to prevent Timeline crashing with error
|
||||
if (out.timeline.date.length === 0) {
|
||||
var tlEntry = {
|
||||
"startDate": '2000,1,1',
|
||||
"headline": 'No data to show!'
|
||||
};
|
||||
out.timeline.date.push(tlEntry);
|
||||
}
|
||||
return out;
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user