Skip to content

Commit

Permalink
fix: resolve potential errors occurring immediately after initializat…
Browse files Browse the repository at this point in the history
…ion in asynchronous trees
  • Loading branch information
izure1 committed Nov 20, 2024
1 parent 547725d commit 06cb224
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@izure/serializable-bptree",
"version": "5.0.1",
"version": "5.0.2",
"description": "Store the B+tree flexibly, not only in-memory.",
"author": "izure1 <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serializable-bptree",
"version": "5.0.1",
"version": "5.0.2",
"description": "Store the B+tree flexibly, not only in-memory.",
"types": "./dist/types/index.d.ts",
"main": "./dist/cjs/index.cjs",
Expand Down
4 changes: 2 additions & 2 deletions src/BPTreeAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ export class BPTreeAsync<K, V> extends BPTree<K, V> {
this.root = await this._createNode(true, [], [], true)
this.strategy.head.root = this.root.id
this.bufferForNodeCreate(this.root)
this.commitHeadBuffer()
this.commitNodeCreateBuffer()
await this.commitHeadBuffer()
await this.commitNodeCreateBuffer()
}
// loaded
else {
Expand Down

0 comments on commit 06cb224

Please sign in to comment.