mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(package/streaming): return promise from streamingRequest
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { waitFor } from '../../';
|
import { waitFor } from '../../';
|
||||||
|
|
||||||
async function streamingRequest(
|
function streamingRequest(
|
||||||
request: Function,
|
request: Function,
|
||||||
hasLoaded: Function,
|
hasLoaded: Function,
|
||||||
assetType: string,
|
assetType: string,
|
||||||
@@ -12,7 +12,7 @@ async function streamingRequest(
|
|||||||
|
|
||||||
request(asset, ...args);
|
request(asset, ...args);
|
||||||
|
|
||||||
waitFor(
|
return waitFor(
|
||||||
() => {
|
() => {
|
||||||
if (hasLoaded(asset)) return asset;
|
if (hasLoaded(asset)) return asset;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user