mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
@@ -50,7 +50,9 @@ local function triggerServerCallback(_, event, delay, cb, ...)
|
|||||||
return promise:resolve(response and { msgpack.unpack(response) } or {})
|
return promise:resolve(response and { msgpack.unpack(response) } or {})
|
||||||
end
|
end
|
||||||
|
|
||||||
return cb and cb(response and msgpack.unpack(response))
|
if cb and response then
|
||||||
|
cb(msgpack.unpack(response))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if promise then
|
if promise then
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ local function triggerClientCallback(_, event, playerId, cb, ...)
|
|||||||
return promise:resolve(response and { msgpack.unpack(response) } or {})
|
return promise:resolve(response and { msgpack.unpack(response) } or {})
|
||||||
end
|
end
|
||||||
|
|
||||||
return cb and cb(response and msgpack.unpack(response))
|
if cb and response then
|
||||||
|
cb(msgpack.unpack(response))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if promise then
|
if promise then
|
||||||
|
|||||||
Reference in New Issue
Block a user