diff --git a/package/client/resource/streaming/index.ts b/package/client/resource/streaming/index.ts index 98be2a6..b569674 100644 --- a/package/client/resource/streaming/index.ts +++ b/package/client/resource/streaming/index.ts @@ -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; },