Skip to content

Commit

Permalink
copy nodes array
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Sep 13, 2023
1 parent 02c74f0 commit 01b034b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ module.exports = class HypercoreBatch extends EventEmitter {
const offset = this.core.tree.length - this._sessionLength
for (let i = 0; i < offset; i++) this._byteLength -= this._appends[i].byteLength

await this.core.insertValuesUnsafe(this._appends.slice(0, offset), this._sessionLength, this._sessionByteLength, b.nodes)
await this.core.insertValuesUnsafe(this._appends.slice(0, offset), this._sessionLength, this._sessionByteLength, b.nodes.slice(0))

this._sessionLength = this.session.length
this._sessionByteLength = this.session.byteLength
Expand Down

0 comments on commit 01b034b

Please sign in to comment.