Skip to content

Commit

Permalink
fix: validate menu container in set export
Browse files Browse the repository at this point in the history
  • Loading branch information
swkeep committed Nov 18, 2024
1 parent 2b53454 commit a6849d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interactionMenu/lua/client/menuContainer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,11 @@ local function setMenuProperty(t)
local menuId = t.menuId
local menuRef = Container.get(menuId)

if not menuRef then
warn("Menu doesn't exists!")
return
end

-- Handle specific property types
if t.type == 'hide' then
setHideProperty(menuRef, t.option, t.value)
Expand Down

0 comments on commit a6849d0

Please sign in to comment.