Skip to content

Commit

Permalink
fix(client): reset item position when swap fails
Browse files Browse the repository at this point in the history
Callback expects boolean; if nil return false.
  • Loading branch information
thelindat committed Jan 6, 2022
1 parent be4fdc2 commit dc8d1b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ RegisterNUICallback('swapItems', function(data, cb)
currentWeapon.slot = weapon
TriggerEvent('ox_inventory:currentWeapon', currentWeapon)
end
cb(response)
cb(response or false)
end)

RegisterNUICallback('buyItem', function(data, cb)
Expand Down

0 comments on commit dc8d1b8

Please sign in to comment.