feat(client/interface): list menu error catching

This commit is contained in:
Luke
2022-08-02 12:24:45 +02:00
committed by Luke
parent dde7daddb7
commit ac7a87cc5b

View File

@@ -2,6 +2,9 @@ local registeredMenus = {}
local openMenu = nil
function lib.registerMenu(data, cb)
if not data.id then return error('No menu id was provided.') end
if not data.title then return error('No menu title was provided.') end
if not data.options then return error('No menu options were provided.') end
data.cb = cb
registeredMenus[data.id] = data
end