Skip to content

Commit

Permalink
fix: Fix error where root chunk was duplicated and inserted
Browse files Browse the repository at this point in the history
  • Loading branch information
izure1 committed Apr 25, 2024
1 parent 1ed52bd commit dbe02c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
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": "tissue-roll",
"version": "4.0.0",
"version": "4.0.1",
"description": "Very simple read/write database with a no-sql.",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion src/document/TissueRollDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class TissueRollDocument<T extends Record<string, SupportedType>> {
}

const db = TissueRoll.Open(file, payloadSize)
const record = db.getRecords(1).pop()!
const record = db.getRecords(1)[0]
const docRoot = TissueRollDocument.Verify(file, record.payload)

return new TissueRollDocument(db, record.header.id, docRoot, 0)
Expand Down

0 comments on commit dbe02c0

Please sign in to comment.