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

Commit

Permalink
Merge pull request #708 from Borewit/fix-issue-707
Browse files Browse the repository at this point in the history
Prevent using `this` without outside class declaration
  • Loading branch information
Borewit authored Jan 16, 2022
2 parents d9cdcaf + 6a3cd60 commit 5f3f234
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 5f3f234

Please sign in to comment.