summaryrefslogtreecommitdiff
path: root/weather-widget
diff options
context:
space:
mode:
Diffstat (limited to 'weather-widget')
-rw-r--r--weather-widget/weather.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua
index 854ff49..43ce974 100644
--- a/weather-widget/weather.lua
+++ b/weather-widget/weather.lua
@@ -86,6 +86,9 @@ function to_direction(degrees)
{ "NW", 303.75, 326.25 },
{ "NNW", 326.25, 348.75 },
}
+ if degrees == nil then
+ return "Unknown dir"
+ end
for i, dir in ipairs(directions) do
if degrees > dir[2] and degrees < dir[3] then
return dir[1]