mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-17 17:48:36 +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
|
||||
registeredMenus[id].options[index] = options
|
||||
else
|
||||
if not options[1] then return error('Invalid override format used, expected table of options.') end
|
||||
registeredMenus[id].options = options
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user