Merge pull request #462 from BerkieBb/patch-1

fix(client/functions): Return right result when with hasitem callback
This commit is contained in:
Kakarot
2022-01-13 13:35:37 -06:00
committed by GitHub
+1 -5
View File
@@ -20,12 +20,8 @@ end
function QBCore.Functions.HasItem(item)
local p = promise.new()
QBCore.Functions.TriggerCallback('QBCore:HasItem', function(result)
if result then
p:resolve(true)
end
p:resolve(false)
p:resolve(result)
end, item)
return Citizen.Await(p)
end