mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-06-06 22:26:46 +00:00
Fix reading indeterminate-length packets in IE11
Broken in 5dcaf85.
This commit is contained in:
parent
cd6eadd6e0
commit
a291a803fb
@ -244,7 +244,7 @@ export default {
|
||||
if (packet_length === Infinity) break;
|
||||
throw new Error('Unexpected end of packet');
|
||||
}
|
||||
const chunk = value.subarray(0, packet_length - bytesRead);
|
||||
const chunk = packet_length === Infinity ? value : value.subarray(0, packet_length - bytesRead);
|
||||
if (writer) await writer.write(chunk);
|
||||
else packet.push(chunk);
|
||||
bytesRead += value.length;
|
||||
|
Loading…
x
Reference in New Issue
Block a user