refactor(callback/client): require source in response handler

This commit is contained in:
Linden
2025-03-18 02:39:41 +11:00
parent 6fcb83101f
commit 8509867abd
2 changed files with 4 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ const pendingCallbacks: Record<string, (...args: any[]) => void> = {};
const callbackTimeout = GetConvarInt('ox:callbackTimeout', 300000);
onNet(`__ox_cb_${cache.resource}`, (key: string, ...args: any) => {
if (!source) return;
const resolve = pendingCallbacks[key];
if (!resolve) return;