cafe-utility 36.1.7 → 36.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2653,7 +2653,7 @@ class ChunkSplitter {
|
|
|
2653
2653
|
async append(t, e = 0, r = 0n) {
|
|
2654
2654
|
const i = new Uint8ArrayReader(t)
|
|
2655
2655
|
for (; i.max() > 0; ) {
|
|
2656
|
-
this.chunks[e].writer.max() === 0 && (await this.elevate(e))
|
|
2656
|
+
;(this.chunks[e].writer.max() === 0 || (r && this.chunks[e].writer.max() < t.length)) && (await this.elevate(e))
|
|
2657
2657
|
const o = this.chunks[e].writer.write(i)
|
|
2658
2658
|
r ? (this.chunks[e].span += r) : (this.chunks[0].span += BigInt(o))
|
|
2659
2659
|
}
|