From c7f811e14d8c8cecc0004620e1846ac672736988 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Mon, 1 Apr 2024 17:04:03 +0200 Subject: [PATCH] fix: ignore haps that error at getFrequency --- packages/draw/pitchwheel.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/draw/pitchwheel.mjs b/packages/draw/pitchwheel.mjs index ced0c579..76978d08 100644 --- a/packages/draw/pitchwheel.mjs +++ b/packages/draw/pitchwheel.mjs @@ -65,7 +65,12 @@ export function pitchwheel({ let shape = []; haps.forEach((hap) => { - const freq = getFrequency(hap); + let freq; + try { + freq = getFrequency(hap); + } catch (err) { + return; + } const angle = freq2angle(freq, root); const [x, y] = circlePos(centerX, centerY, radius, angle); const hapColor = hap.value.color || color;