mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-10-30 13:05:04 +00:00
fix(callback/js): prevent args from being wrapped in an array when resolving the promise (#744)
This commit is contained in:
1 parent
8d1677f397
commit
b4e3bcdad7
2 files changed
+2
-2
No files matched your search
@@ -12,7 +12,7 @@ onNet(`__ox_cb_${cache.resource}`, (key: string, ...args: any) => {
|
||||
|
||||
delete pendingCallbacks[key];
|
||||
|
||||
resolve(args);
|
||||
resolve(...args);
|
||||
});
|
||||
|
||||
const eventTimers: Record<string, number> = {};
|
||||
|
||||
@@ -10,7 +10,7 @@ onNet(`__ox_cb_${cache.resource}`, (key: string, ...args: any) => {
|
||||
|
||||
delete pendingCallbacks[key];
|
||||
|
||||
resolve(args);
|
||||
resolve(...args);
|
||||
});
|
||||
|
||||
export function triggerClientCallback<T = unknown>(
|
||||
|
||||
Reference in new issue
Block a user