Fix to callbacks for return data
Was only passing 1 value back, allowed for n
This commit is contained in:
1 parent
ad0949d691
commit
6fbeece181
1 file changed
+2
-1
@@ -49,7 +49,8 @@ local function triggerCallback(eventName, target, name, args, callback)
|
||||
|
||||
if not callback then
|
||||
local result = Citizen.Await(promise)
|
||||
return #result == 1 and result[1] or table.unpack(result)
|
||||
local returnResults = (result and type(result) == 'table' ) and result or {result}
|
||||
return table.unpack(returnResults)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user