mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
superdough: fallback to triangle when non-string is given
This commit is contained in:
@@ -101,6 +101,10 @@ export async function aliasBank(...args) {
|
||||
}
|
||||
|
||||
export function getSound(s) {
|
||||
if (typeof s !== 'string') {
|
||||
console.warn(`getSound: expected string got "${s}". fall back to triangle`);
|
||||
return soundMap.get().triangle; // is this good?
|
||||
}
|
||||
return soundMap.get()[s.toLowerCase()];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user