mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 07:56:02 +01:00
feat(interface/menu): improve error handling for invalid option override
This commit is contained in:
@@ -72,6 +72,7 @@ function lib.setMenuOptions(id, options, index)
|
|||||||
if index then
|
if index then
|
||||||
registeredMenus[id].options[index] = options
|
registeredMenus[id].options[index] = options
|
||||||
else
|
else
|
||||||
|
if not options[1] then return error('Invalid override format used, expected table of options.') end
|
||||||
registeredMenus[id].options = options
|
registeredMenus[id].options = options
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user