Skip to content

Commit

Permalink
catch after making promise
Browse files Browse the repository at this point in the history
  • Loading branch information
chm-diederichs committed Jul 29, 2024
1 parent a8581b4 commit 90f2f0d
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 @@ -1599,6 +1599,7 @@ module.exports = class Autobase extends ReadyResource {
!system.sameIndexers(this.linearizer.indexers)

const localLookup = this.localWriter ? system.get(this.local.key, { timeout }) : null
if (localLookup) localLookup.catch(noop)

const indexers = []
const pendingViews = []
Expand Down Expand Up @@ -1637,8 +1638,6 @@ module.exports = class Autobase extends ReadyResource {
await Promise.all(promises)

if (localLookup) {
localLookup.catch(emitWarning)

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

0 comments on commit 90f2f0d

Please sign in to comment.