Skip to content

Commit

Permalink
fix(server): incorrect string.find when removing invalid metadata
Browse files Browse the repository at this point in the history
v is a table, we need to search v.name
  • Loading branch information
thelindat authored Dec 30, 2021
1 parent 59ec6cc commit 200ce8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ AddEventHandler('ox_inventory:setPlayerInventory', function(player, data)
end

-- Remove invalid durability
if v.metadata.durability and not item.durability and not item.degrade and not v:find('WEAPON_') then
if v.metadata.durability and not item.durability and not item.degrade and not v.name:find('WEAPON_') then
v.metadata.durability = nil
end
end
Expand Down

0 comments on commit 200ce8a

Please sign in to comment.