mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-27 03:53:07 +00:00
changed yield to await
This commit is contained in:
parent
f7bdff0244
commit
21b836bfcf
1 changed files with 1 additions and 1 deletions
|
@ -378,7 +378,7 @@ export class ToneAudioBuffer extends Tone {
|
||||||
location.href = (baseUrl + url);
|
location.href = (baseUrl + url);
|
||||||
location.pathname = (location.pathname + location.hash).split("/").map(encodeURIComponent).join("/");
|
location.pathname = (location.pathname + location.hash).split("/").map(encodeURIComponent).join("/");
|
||||||
|
|
||||||
const response = yield fetch(location.href);
|
const response = await fetch(location.href);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`could not load url: ${url}`);
|
throw new Error(`could not load url: ${url}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue