Skip to content

Commit ba8dcc8

Browse files
return block if no encryption is present
1 parent b2d79d3 commit ba8dcc8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/batch.js

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ module.exports = class HypercoreBatch extends EventEmitter {
193193
const length = this._sessionLength
194194
if (index < length) {
195195
const block = await this.session.get(index, { ...opts, tree: this._sessionBatch })
196+
if (!this.session.encryption) return block
196197
return this._encrypt(index, block)
197198
}
198199

0 commit comments

Comments
 (0)