We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18ce517 commit baec25bCopy full SHA for baec25b
src/Decoder.ts
@@ -477,7 +477,7 @@ export class Decoder {
477
478
const offset = this.pos + headerOffset;
479
let object: string;
480
- if (this.cachedKeyDecoder && this.stateIsMapKey() && this.cachedKeyDecoder.canBeCached(byteLength)) {
+ if (this.stateIsMapKey() && this.cachedKeyDecoder?.canBeCached(byteLength)) {
481
object = this.cachedKeyDecoder.decode(this.bytes, offset, byteLength);
482
} else if (TEXT_ENCODING_AVAILABLE && byteLength > TEXT_DECODER_THRESHOLD) {
483
object = utf8DecodeTD(this.bytes, offset, byteLength);
0 commit comments