diff --git a/src/scripts/device/state-routes.lua b/src/scripts/device/state-routes.lua index b889524b..e71a76f5 100644 --- a/src/scripts/device/state-routes.lua +++ b/src/scripts/device/state-routes.lua @@ -114,7 +114,7 @@ apply_route_props_hook = SimpleEventHook { local dev_info = devinfo:get_device_info (device) assert (dev_info) - if next (selected_routes) == nil then + if selected_routes:get_count () == 0 then log:info (device, "No routes selected to set on " .. dev_info.name) return end