Skip to content

Commit

Permalink
always return heads from load system info
Browse files Browse the repository at this point in the history
  • Loading branch information
chm-diederichs committed Jun 12, 2024
1 parent c47f669 commit 43967f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ module.exports = class Autobase extends ReadyResource {

this._systemPointer = length

if (!length) return { bootstrap, system: null }
if (!length) return { bootstrap, system: null, heads: [] }

const encryptionKey = AutoStore.getBlockKey(bootstrap, this.encryptionKey, '_system')
const actualCore = this.store.get({ key, exclusive: false, compat: false, encryptionKey, isBlockKey: true })
Expand All @@ -313,7 +313,7 @@ module.exports = class Autobase extends ReadyResource {
if (length === 0 || !(await core.has(length - 1))) {
await this.local.setUserData('autobase/boot', null)
this._systemPointer = 0
return { bootstrap, system: null }
return { bootstrap, system: null, heads: [] }
}

const system = new SystemView(core, length)
Expand Down

0 comments on commit 43967f0

Please sign in to comment.