mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(callback): bad argument to unpack when callback throws error
Throwing an error responds with false rather than a string.
This commit is contained in:
@@ -50,7 +50,7 @@ local function triggerServerCallback(_, event, delay, cb, ...)
|
||||
return promise:resolve(response and { msgpack.unpack(response) } or {})
|
||||
end
|
||||
|
||||
return cb and cb(msgpack.unpack(response))
|
||||
return cb and cb(response and msgpack.unpack(response))
|
||||
end
|
||||
|
||||
if promise then
|
||||
|
||||
Reference in New Issue
Block a user