mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-28 21:14:44 +00:00
feat(interface/menu): improve error handling for invalid option override
This commit is contained in:
1 parent
d295a0a11b
commit
d494b70506
1 file changed
+1
@@ -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