mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
fix(menu): prevent opening empty menu (#675)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user