Not possible to decode unknown data in JavaScript SDK

Hello! I'm having trouble decoding unknown data with the FIT JavaScript SDK (v21.115.1).

When calling the Decoder.read() function with the includeUnknownData option, I get a "TypeError: field is undefined" error in the returned errors array and only a handful of messages.

It seems that the following condition in the decoder.js can resolve when includeUnknownData is set to true even when field is not set:

    if (fieldName != null && (field != null || this.#optIncludeUnknownData))

This causes issues in the following conditions where field is accessed as an object despite being undefined, causing the TypeError:

    if (field.subFields.length > 0)
    if (field.hasComponents)
    if (field.isAccumulated)

See https://github.com/garmin/fit-javascript-sdk/blob/7594a95e7620fd739a12280f6664c8e86b2d058c/src/decoder.js#L332C12-L346C14

Am I missing something or is this a bug?