Merge pull request #762 from marcelblum/regexp-fix

fixes #761
This commit is contained in:
Yotam Mann 2020-10-15 23:01:19 +02:00 committed by GitHub
commit a5a3d332d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -356,7 +356,7 @@ export class ToneAudioBuffer extends Tone {
static async load(url: string): Promise<AudioBuffer> {
// test if the url contains multiple extensions
const matches = url.match(/\[(.+\|?)+\]$/);
const matches = url.match(/\[([^\]\[]+\|.+)\]$/);
if (matches) {
const extensions = matches[1].split("|");
let extension = extensions[0];