Skip to content

Commit

Permalink
Merge pull request #1492 from Kenshiin13/fix-esx-skin
Browse files Browse the repository at this point in the history
fix(esx_skin/client/modules/menu): clear old menu items before inserting new ones
  • Loading branch information
Mycroft-Studios authored Nov 20, 2024
2 parents 7910d01 + d947633 commit c63e1fd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions [core]/esx_skin/client/modules/menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ end
function Menu:InsertElements()
local playerPed = PlayerPedId()

self.elements = {}
for i = 1, #self.components, 1 do
local value = self.components[i].value
local componentId = self.components[i].componentId
Expand All @@ -51,9 +52,6 @@ function Menu:InsertElements()
data.type = "slider"
data.max = self.maxValues[self.components[i].name]

if not self.elements then
self.elements = {}
end
self.elements[#self.elements + 1] = data
end
end
Expand Down

0 comments on commit c63e1fd

Please sign in to comment.