Skip to content

Commit 22d6a11

Browse files
committed
fix flush
1 parent fc90884 commit 22d6a11

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class HyperBlobsBatch {
5858
}
5959

6060
async flush () {
61-
await this.core.append(this.blocks)
61+
await this.blobs.core.append(this.blocks)
6262
this.blocks = []
6363
this.bytes = 0
6464
}

test/all.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ test('basic batch', async (t) => {
392392
const buf = await batch.get(id)
393393
t.alike(buf, Buffer.from('hej verden'))
394394
}
395+
396+
await batch.flush()
395397
})
396398

397399
async function createPair () {

0 commit comments

Comments
 (0)