mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-18 18:18:34 +00: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:
1 parent
6f0bf6a624
commit
2bb0d68415
2 files changed
+5
-3
No files matched your search
@@ -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