superdough: fallback to triangle when non-string is given
This commit is contained in:
parent
ffe831d24b
commit
7565354274
1 changed files with 4 additions and 0 deletions
|
|
@ -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()];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue