device/state-routes.lua: fix check for empty selected-routes

This hook and previous hooks hooks default to setting the
selected-routes event property to an empty table, not nil.
This commit is contained in:
Duncan Overbruck
2023-06-23 12:49:01 +02:00
parent b0460d8050
commit 7eb6ff3b9e

View File

@@ -117,7 +117,7 @@ apply_route_props_hook = SimpleEventHook {
local dev_info = devinfo:get_device_info (device)
assert (dev_info)
if not selected_routes then
if next (selected_routes) == nil then
log:info (device, "No routes selected to set on " .. dev_info.name)
return
end