Skip to content

Commit

Permalink
fix flush
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Dec 17, 2024
1 parent fc90884 commit 22d6a11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class HyperBlobsBatch {
}

async flush () {
await this.core.append(this.blocks)
await this.blobs.core.append(this.blocks)
this.blocks = []
this.bytes = 0
}
Expand Down
2 changes: 2 additions & 0 deletions test/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ test('basic batch', async (t) => {
const buf = await batch.get(id)
t.alike(buf, Buffer.from('hej verden'))
}

await batch.flush()
})

async function createPair () {
Expand Down

0 comments on commit 22d6a11

Please sign in to comment.