cafe-utility 35.0.0 → 35.0.1

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.
Files changed (2) hide show
  1. package/index.js +8 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2551,7 +2551,14 @@ class ChunkSplitter {
2551
2551
  this.chunks[e] = new Chunk()
2552
2552
  }
2553
2553
  async finalize(e = 0) {
2554
- return this.chunks[e + 1] ? (this.counters[e] === 1 ? (await this.elevate(e + 1), (this.chunks[e + 1] = this.chunks[e]), this.finalize(e + 1)) : (await this.elevate(e), this.finalize(e + 1))) : (await this.onChunk(this.chunks[e]), this.chunks[e])
2554
+ if (!this.chunks[e + 1]) {
2555
+ if (this.encrypted) {
2556
+ const { key: t } = this.chunks[e].encryptedHash()
2557
+ await this.onChunk(this.chunks[e], t)
2558
+ } else await this.onChunk(this.chunks[e])
2559
+ return this.chunks[e]
2560
+ }
2561
+ return this.counters[e] === 1 ? (await this.elevate(e + 1), (this.chunks[e + 1] = this.chunks[e]), this.finalize(e + 1)) : (await this.elevate(e), this.finalize(e + 1))
2555
2562
  }
2556
2563
  }
2557
2564
  ;(exports.ChunkSplitter = ChunkSplitter), (_a = ChunkSplitter), (ChunkSplitter.NOOP = async (n, e) => {})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cafe-utility",
3
- "version": "35.0.0",
3
+ "version": "35.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "exports": {