From a2bb1b88eac23c91cfb43c4b118eefc20395d93e Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Fri, 17 May 2024 18:37:11 +0100 Subject: [PATCH] Remove unrelated units check --- internal/widget/weather.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/widget/weather.go b/internal/widget/weather.go index 723d1db..dd03319 100644 --- a/internal/widget/weather.go +++ b/internal/widget/weather.go @@ -31,8 +31,8 @@ func (widget *Weather) Initialize() error { widget.TimeLabels = timeLabels12h } else if widget.HourFormat == "24h" { widget.TimeLabels = timeLabels24h - } else if widget.Units != "12h" && widget.Units != "24h" { - return fmt.Errorf("invalid hour format '%s' for weather, must be either 12h or 24h", widget.HourFormat) + } else { + return fmt.Errorf("invalid hour format '%s' for weather widget, must be either 12h or 24h", widget.HourFormat) } if widget.Units == "" {