diff --git a/services/web/scripts/delete_dangling_comments.mjs b/services/web/scripts/delete_dangling_comments.mjs index b6033ed8e6..71454cbd33 100644 --- a/services/web/scripts/delete_dangling_comments.mjs +++ b/services/web/scripts/delete_dangling_comments.mjs @@ -51,7 +51,7 @@ async function processProject(projectId) { async function processDoc(projectId, doc, threadIds) { let commentsDeleted = 0 - for (const comment of doc.ranges.comments ?? []) { + for (const comment of doc.ranges?.comments ?? []) { const threadId = comment.op.t if (!threadIds.has(threadId)) { if (OPTS.commit) {