fix minRequiredDepth when tangle is unknown

This commit is contained in:
Andre Staltz 2024-01-16 16:16:18 +02:00
parent 7fb5a0f107
commit 6707df0ee4
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 1 additions and 1 deletions

View File

@ -352,7 +352,7 @@ function initDict(peer, config) {
const tangle = peer.db.getTangle(tangleID)
// prettier-ignore
if (!tangle || tangle.size === 0) throw new Error(`Tangle "${tangleID}" is locally unknown`)
if (!tangle || tangle.size === 0) return 0
// prettier-ignore
if (!MsgV4.isMoot(tangle.root)) throw new Error(`Tangle "${tangleID}" is not a moot`)
const domain = tangle.root.metadata.domain