mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-19 02:28:33 +00:00
fix(package/streaming): return promise from streamingRequest
This commit is contained in:
1 parent
1456f4493e
commit
5868649d18
1 file changed
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { waitFor } from '../../';
|
||||
|
||||
async function streamingRequest(
|
||||
function streamingRequest(
|
||||
request: Function,
|
||||
hasLoaded: Function,
|
||||
assetType: string,
|
||||
@@ -12,7 +12,7 @@ async function streamingRequest(
|
||||
|
||||
request(asset, ...args);
|
||||
|
||||
waitFor(
|
||||
return waitFor(
|
||||
() => {
|
||||
if (hasLoaded(asset)) return asset;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user