Skip to content

Commit

Permalink
aat: fix bug (empty cells in table)
Browse files Browse the repository at this point in the history
  • Loading branch information
schachmat committed Apr 6, 2016
1 parent e3d703a commit 81d72ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/ascii-art-table.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func (c *aatConfig) printDay(day iface.Day) (ret []string) {
cand := candidate.Time.UTC().Sub(candidate.Time.Truncate(24 * time.Hour))
for i, col := range cols {
cur := col.Time.Sub(col.Time.Truncate(24 * time.Hour))
if math.Abs(float64(cand-desiredTimesOfDay[i])) < math.Abs(float64(cur-desiredTimesOfDay[i])) {
if col.Time.IsZero() || math.Abs(float64(cand-desiredTimesOfDay[i])) < math.Abs(float64(cur-desiredTimesOfDay[i])) {
cols[i] = candidate
}
}
Expand Down

0 comments on commit 81d72ff

Please sign in to comment.