Skip to content

Commit

Permalink
refactor(server): explicitly check inventory data is a table
Browse files Browse the repository at this point in the history
Some people are triggering setPlayerInventory with the wrong values.
(or rather some ESX change broke their inventory data)
  • Loading branch information
thelindat committed Mar 14, 2024
1 parent 71f2090 commit 6c55eae
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 @@ function server.setPlayerInventory(player, data)
local inventory = {}
local totalWeight = 0

if data and next(data) then
if type(data) == 'table' then
local ostime = os.time()

for _, v in pairs(data) do
Expand Down

0 comments on commit 6c55eae

Please sign in to comment.