mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-14 15:57:08 +00:00
Update ToneAudioBuffer.ts
improving url parsing regexp to avoid hangs in edge case filepaths
This commit is contained in:
parent
e7e372d37e
commit
09a524994d
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue