diff --git a/packages/webaudio/sampler.mjs b/packages/webaudio/sampler.mjs index 7b437ae3..f94b6b5a 100644 --- a/packages/webaudio/sampler.mjs +++ b/packages/webaudio/sampler.mjs @@ -124,7 +124,8 @@ let sampleCache = { current: undefined }; export const samples = async (sampleMap, baseUrl = sampleMap._base || '') => { if (typeof sampleMap === 'string') { if (sampleMap.startsWith('github:')) { - const [_, path] = sampleMap.split('github:'); + let [_, path] = sampleMap.split('github:'); + path = path.endsWith('/') ? path.slice(0, -1) : path; sampleMap = `https://raw.githubusercontent.com/${path}/strudel.json`; } if (typeof fetch !== 'function') {