fix slice test

`added` bytes was calculated wrong
This commit is contained in:
Jimmy Wärting
2020-07-24 01:56:18 +02:00
committed by Jimmy Wärting
parent 26ca0e39b4
commit ae6b565ae6
+1 -1
View File
@@ -138,7 +138,7 @@ class Blob {
} else {
const chunk = part.slice(relativeStart, Math.min(size, relativeEnd));
blobParts.push(chunk);
added += size;
added += ArrayBuffer.isView(chunk) ? chunk.byteLength : chunk.size;
relativeStart = 0; // All next sequental parts should start at 0
// don't add the overflow to new blobParts