tiny refactor

This commit is contained in:
Andre Staltz 2023-04-21 15:57:22 +03:00
parent 80168f77cc
commit 4051ba00e2
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 1 additions and 2 deletions

View File

@ -31,9 +31,8 @@ class Algorithm {
let minDepth = Number.MAX_SAFE_INTEGER
let maxDepth = 0
for (const rec of this.#peer.db.records()) {
if (!rec.msg) continue
if (!rec.msg?.content) continue
const tangles = rec.msg.metadata.tangles
if (!rec.msg.content) continue
if (rec.hash === rootMsgHash) {
minDepth = 0
} else if (tangles[rootMsgHash]) {