Merge pull request #23706 from overleaf/em-fix-dangling-comments-script

Fix dangling comments script when doc does not have ranges

GitOrigin-RevId: 31cf25ecf79f7ab0ed872c403d31b2c5064b4c76
This commit is contained in:
Eric Mc Sween
2025-02-19 15:04:20 -05:00
committed by Copybot
parent dfc0670475
commit 7e98159fc5

View File

@@ -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) {