Skip to content

Commit

Permalink
fix(package/streaming): return promise from streamingRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Mar 27, 2024
1 parent 1456f44 commit 5868649
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/client/resource/streaming/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { waitFor } from '../../';

async function streamingRequest(
function streamingRequest(
request: Function,
hasLoaded: Function,
assetType: string,
Expand All @@ -12,7 +12,7 @@ async function streamingRequest(

request(asset, ...args);

waitFor(
return waitFor(
() => {
if (hasLoaded(asset)) return asset;
},
Expand Down

0 comments on commit 5868649

Please sign in to comment.