Skip to content

Commit

Permalink
Return an error when time format is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed May 29, 2021
1 parent a34b336 commit ffce5de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widget_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (w *TimeWidget) Update(dev *streamdeck.Device) error {
formats := strings.Split(w.format, ";")
fonts := strings.Split(w.font, ";")

if len(formats) == 0 {
if len(formats) == 0 || len(w.format) == 0 {
return fmt.Errorf("no time format supplied")
}
for len(fonts) < len(formats) {
Expand Down

0 comments on commit ffce5de

Please sign in to comment.