diff --git a/.changeset/ninety-monkeys-notice.md b/.changeset/ninety-monkeys-notice.md new file mode 100644 index 0000000000..cfeea39054 --- /dev/null +++ b/.changeset/ninety-monkeys-notice.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/mp3-encoder': patch +--- + +Suppressed assertions at the LAME encoding due to unknown `NaN` values diff --git a/packages/mp3-encoder/src/lame/assert.ts b/packages/mp3-encoder/src/lame/assert.ts index 41e66ac678..02ebedd295 100644 --- a/packages/mp3-encoder/src/lame/assert.ts +++ b/packages/mp3-encoder/src/lame/assert.ts @@ -1,8 +1,11 @@ export function assert( condition: boolean, - message?: string, + _message?: string, ): asserts condition { if (!condition) { - throw new Error(message); + // TODO: There is a condition generating multiple NaN values that was never + // addressed in the original code and is not clear how to handle it. + // Originally this assertion was commented out, probably because of it. + // throw new Error(message); } }