fix bytebeat output proxy reaction

other non-number outputs don't show any visible error and convert to NaN.
i didn't notice this when writing the relevant code.
This commit is contained in:
SArpnt 2024-08-08 22:53:28 -04:00
parent e36ca3a23e
commit c25c85bdfa
Signed by: SArpnt
SSH key fingerprint: SHA256:iDMeic8KkqqEsN4wODlgsk1d/oW1ojZ/cu/MEWyfLBw

View file

@ -281,7 +281,7 @@ class BytebeatProcessor extends AudioWorkletProcessor {
// WeakSet.has() works correctly with any input, not just valid WeakKeys
// @ts-expect-error
if (proxies.has(v)) {
throw new TypeError("can't convert proxy to number");
return NaN;
} else {
// this does not cast BigInt, which matches the behaviour of
// placing it directly into a typed array