Skip to content

Commit

Permalink
only set local length if lookup succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
chm-diederichs committed Jul 29, 2024
1 parent bf52c7c commit 82e8241
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1638,8 +1638,7 @@ module.exports = class Autobase extends ReadyResource {

if (localLookup) {
const value = await localLookup
if (value) info.localLength = value.length
if (value.isRemoved) info.localLength = -1
if (value) info.localLength = value.isRemoved ? -1 : value.length
}

const closing = []
Expand Down

0 comments on commit 82e8241

Please sign in to comment.