diff -r f16b021e8a61 -r 6b860de18a53 mod_cloud_notify/mod_cloud_notify.lua --- a/mod_cloud_notify/mod_cloud_notify.lua Wed May 30 19:14:01 2018 +0200 +++ b/mod_cloud_notify/mod_cloud_notify.lua Fri Jun 01 17:54:07 2018 +0200 @@ -59,7 +59,7 @@ key = t.__orderedIndex[1] else -- fetch the next value - for i = 1,table.getn(t.__orderedIndex) do + for i = 1, #t.__orderedIndex do if t.__orderedIndex[i] == state then key = t.__orderedIndex[i+1] end