Frontend: Fix year filter

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2019-12-28 23:10:01 +01:00
parent a66d0887bd
commit 9f29b2eb90

View file

@ -253,9 +253,13 @@
},
yearOptions() {
let result = [{"year": 0, "label": "All Years"}];
for (let i = 0; i < this.config.years.length; i++) {
result.push({"year": this.config.years[i], "label": this.config.years[i].toString()});
if (this.config.years) {
for (let i = 0; i < this.config.years.length; i++) {
result.push({"year": this.config.years[i], "label": this.config.years[i].toString()});
}
}
return result;
},
},