fix(package/streaming): return promise from streamingRequest

This commit is contained in:
Linden
2024-03-27 14:27:33 +11:00
parent 1456f4493e
commit 5868649d18

View File

@@ -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;
}, },