Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Prevent using this without outside class declaration
Browse files Browse the repository at this point in the history
Maybe resolves: #707
  • Loading branch information
Borewit committed Jan 16, 2022
1 parent d9cdcaf commit 6a3cd60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export async function fetchFromUrl(audioTrackUrl: string, options?: IOptions): P
};
if (response.ok) {
if (response.body) {
const res = await this.parseReadableStream(response.body, fileInfo, options);
const res = await parseReadableStream(response.body, fileInfo, options);
debug('Closing HTTP-readable-stream...');
if (!response.body.locked) { // Prevent error in Firefox
await response.body.cancel();
Expand All @@ -103,7 +103,7 @@ export async function fetchFromUrl(audioTrackUrl: string, options?: IOptions): P
return res;
} else {
// Fall back on Blob
return this.parseBlob(await response.blob(), options);
return parseBlob(await response.blob(), options);
}
} else {
throw new Error(`HTTP error status=${response.status}: ${response.statusText}`);
Expand Down

0 comments on commit 6a3cd60

Please sign in to comment.