Skip to content

Commit ae6b565

Browse files
committed
fix slice test
`added` bytes was calculated wrong
1 parent 26ca0e3 commit ae6b565

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class Blob {
138138
} else {
139139
const chunk = part.slice(relativeStart, Math.min(size, relativeEnd));
140140
blobParts.push(chunk);
141-
added += size;
141+
added += ArrayBuffer.isView(chunk) ? chunk.byteLength : chunk.size;
142142
relativeStart = 0; // All next sequental parts should start at 0
143143

144144
// don't add the overflow to new blobParts

0 commit comments

Comments
 (0)