File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,6 @@ local function worker(user_args)
172172 local lang = args .lang or SYS_LANG
173173 local locale = get_locale (lang )
174174
175- --- Validate required parameters
176- if args .coordinates == nil or args .api_key == nil then
177- show_warning (locale .parameter_warning ..
178- (args .coordinates == nil and ' <b>coordinates</b>' or ' ' ) ..
179- (args .api_key == nil and ' , <b>api_key</b> ' or ' ' ))
180- return
181- end
182-
183175 local coordinates = args .coordinates
184176 local api_key = args .api_key
185177 local font_name = args .font_name or beautiful .font :gsub (" %s%d+$" , " " )
@@ -194,6 +186,13 @@ local function worker(user_args)
194186 local timeout = args .timeout or 120
195187 local ICONS_DIR = WIDGET_DIR .. ' /icons/' .. icon_pack_name .. ' /'
196188
189+ --- Validate required parameters
190+ if args .coordinates == nil or args .api_key == nil then
191+ show_warning (locale .parameter_warning ..
192+ (args .coordinates == nil and ' <b>coordinates</b>' or ' ' ) ..
193+ (args .api_key == nil and ' , <b>api_key</b> ' or ' ' ))
194+ return
195+ end
197196 -- Forecast endpoint includes current. I could map show_daily_forecast to days here.
198197 -- Currently overfetching but only showing when opting in.
199198 local weather_api =
You can’t perform that action at this time.
0 commit comments