We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e841a53 commit 028f861Copy full SHA for 028f861
packages/hub/src/utils/XetBlob.ts
@@ -327,8 +327,11 @@ export class XetBlob extends Blob {
327
totalFetchBytes += result.value.byteLength;
328
329
if (leftoverBytes) {
330
- result.value = new Uint8Array([...leftoverBytes, ...result.value]);
331
- leftoverBytes = undefined;
+ const leftoverBytesLength: number = leftoverBytes.length;
+ const combinedBytes = new Uint8Array(leftoverBytesLength + result.value.length);
332
+ combinedBytes.set(leftoverBytes);
333
+ combinedBytes.set(result.value, leftoverBytesLength);
334
+ result.value = combinedBytes;
335
}
336
337
while (totalBytesRead < maxBytes && result.value.byteLength) {
0 commit comments