Repair error in encoder contents extraction.
This commit is contained in:
parent
57c66f81b1
commit
2ff4e88822
|
@ -83,7 +83,9 @@ export class EncoderState {
|
|||
return new Bytes(this.view.buffer.slice(0, resultLength));
|
||||
} else {
|
||||
this.rotatebuffer(4096);
|
||||
return Bytes.concat(this.chunks);
|
||||
const chunks = this.chunks;
|
||||
this.chunks = [];
|
||||
return Bytes.concat(chunks);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,7 +97,9 @@ export class EncoderState {
|
|||
return s;
|
||||
} else {
|
||||
this.rotatebuffer(4096);
|
||||
return this.chunks.map(asLatin1).join('');
|
||||
const chunks = this.chunks;
|
||||
this.chunks = [];
|
||||
return chunks.map(asLatin1).join('');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue