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:
@@ -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
|
||||
|
Reference in New Issue
Block a user