Commit
+8 -2 +/-1 browse
1 | diff --git a/util.go b/util.go |
2 | index 5ecb373..4c2425f 100644 |
3 | --- a/util.go |
4 | +++ b/util.go |
5 | @@ -63,12 +63,18 @@ func summerizeTasks(config *Config, tasks []*Task) { |
6 | fmt.Printf(" ") |
7 | } |
8 | // user specified color mapping exists |
9 | - if color := config.Colors.Get(tag); color != nil { |
10 | - color.Printf("%s", tag) |
11 | + if config.Colors != nil { |
12 | + if color := config.Colors.Get(tag); color != nil { |
13 | + color.Printf("%s", tag) |
14 | + } else { |
15 | + // no color mapping for tag |
16 | + fmt.Printf("%s", tag) |
17 | + } |
18 | } else { |
19 | // no color mapping |
20 | fmt.Printf("%s", tag) |
21 | } |
22 | + |
23 | } |
24 | fmt.Printf("]") |
25 | } |