mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-25 20:34:47 +00:00
1 parent
541e708970
commit
03dcf14f7e
2 files changed
+6
-2
No files matched your search
@@ -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