diff --git a/lib/algorithm.js b/lib/algorithm.js index f3dfd13..3329fc3 100644 --- a/lib/algorithm.js +++ b/lib/algorithm.js @@ -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]) {