changed yield to await

This commit is contained in:
Daniel Fernandes 2021-06-08 16:19:21 +05:30 committed by GitHub
parent f7bdff0244
commit 21b836bfcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -378,7 +378,7 @@ export class ToneAudioBuffer extends Tone {
location.href = (baseUrl + url);
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) {
throw new Error(`could not load url: ${url}`);
}