mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-29 21:14:44 +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 '../../';
|
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