BUGFIX: no more empty array elements

This commit is contained in:
Simon Martens
2025-01-02 03:59:54 +01:00
parent 4f2649cd8b
commit e6a77ab557
2 changed files with 12 additions and 11 deletions

View File

@@ -33,10 +33,8 @@ func YearView(year int, lib *xmlmodels.Library) (*YearVM, error) {
lib.Issues.Lock()
for _, issue := range lib.Issues.Array {
log.Printf("Issue: %v", issue)
y := issue.Datum.When.Year
if y == 0 {
log.Println("Issue has no year: ", issue.String())
}
years[y] = true
if y == year {
functions.MapArrayInsert(issues, issue.Datum.When.Month, issue)