fix(menu): prevent opening empty menu (#675)

This commit is contained in:
BerkieBb
2025-01-19 16:06:25 +01:00
committed by GitHub
parent f89536437a
commit 79f311a365

View File

@@ -49,6 +49,11 @@ function lib.showMenu(id, startIndex)
if not menu then
error(('No menu with id %s was found'):format(id))
end
if table.type(menu.options) == 'empty' then
error(('Can\'t open empty menu with id %s'):format(id))
end
if not openMenu then
local control = cache.game == 'fivem' and 140 or 0xE30CD707