diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index cc75e59648a4..7875a3d90ece 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -190,8 +190,10 @@ drawer.menu_name_handlers = { [core.MENU_CAROUSEL_ENTRY] = function(drawing_menu, entry) local carid = entry.carousel_id local caridx = config.getCarouselIndex(carid) - local choices = entry.items() - + local choices = entry.items + if type(choices) == "function" then + choices = choices() + end if #choices < caridx then caridx = 1 end diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index dd12d7fabd2a..e0e7c6c3c055 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -65,8 +65,10 @@ menu.handlers = { -- carousel (rotating) functionality local carid = entry.carousel_id local caridx = config.getCarouselIndex(carid) - local choices = entry.items() - + local choices = entry.items + if type(choices) == "function" then + choices = choices() + end if #choices > 0 then caridx = (caridx % #choices) + 1 config.setCarouselIndex(carid, caridx)