mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-26 13:08:28 +00:00
add catch
This commit is contained in:
parent
bf7fe2bf75
commit
321a888921
@ -65,7 +65,8 @@ export function registerSamplesFromDB(config = userSamplesDBConfig, onComplete =
|
|||||||
sounds.set(parentDirectory, soundPaths);
|
sounds.set(parentDirectory, soundPaths);
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
).then(() => {
|
)
|
||||||
|
.then(() => {
|
||||||
sounds.forEach((soundPaths, key) => {
|
sounds.forEach((soundPaths, key) => {
|
||||||
const value = Array.from(soundPaths);
|
const value = Array.from(soundPaths);
|
||||||
registerSound(key, (t, hapValue, onended) => onTriggerSample(t, hapValue, onended, value), {
|
registerSound(key, (t, hapValue, onended) => onTriggerSample(t, hapValue, onended, value), {
|
||||||
@ -79,6 +80,10 @@ export function registerSamplesFromDB(config = userSamplesDBConfig, onComplete =
|
|||||||
|
|
||||||
logger('imported sounds registered!', 'success');
|
logger('imported sounds registered!', 'success');
|
||||||
onComplete();
|
onComplete();
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
logger('Something went wrong while registering saved samples from the index db', 'error');
|
||||||
|
console.error(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user