fix(callback): multi-return values for callback method

Resolves #136
This commit is contained in:
Linden
2022-10-25 03:02:44 +11:00
parent 541e708970
commit 03dcf14f7e
2 changed files with 6 additions and 2 deletions

View File

@@ -50,7 +50,9 @@ local function triggerServerCallback(_, event, delay, cb, ...)
return promise:resolve(response and { msgpack.unpack(response) } or {})
end
return cb and cb(response and msgpack.unpack(response))
if cb and response then
cb(msgpack.unpack(response))
end
end
if promise then