mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-12 22:15:27 -04:00
fixed bug where withBase would silence a pattern if freq was unset
This commit is contained in:
@@ -149,6 +149,7 @@ export const withBase = register('withBase', (b, pat) => {
|
||||
let hVal = hap.value;
|
||||
const isObject = typeof hVal === 'object';
|
||||
let freq = isObject ? hVal.freq : hVal;
|
||||
if (!freq) return hap;
|
||||
freq = (freq * base) / originalBase;
|
||||
hap.value = isObject ? { ...hap.value, freq } : { freq };
|
||||
return hap;
|
||||
|
||||
Reference in New Issue
Block a user