Skip to content

Commit ffce5de

Browse files
committed
Return an error when time format is empty
1 parent a34b336 commit ffce5de

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

widget_time.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (w *TimeWidget) Update(dev *streamdeck.Device) error {
5050
formats := strings.Split(w.format, ";")
5151
fonts := strings.Split(w.font, ";")
5252

53-
if len(formats) == 0 {
53+
if len(formats) == 0 || len(w.format) == 0 {
5454
return fmt.Errorf("no time format supplied")
5555
}
5656
for len(fonts) < len(formats) {

0 commit comments

Comments
 (0)