mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
[chat] gracefully handle projects without threads/messages when cloning (#36101)
GitOrigin-RevId: 0623a4b801f469b7d55412f2be8aac782cb6ab19
This commit is contained in:
@@ -16,6 +16,7 @@ export async function cloneThreads(sourceProjectId, targetProjectId) {
|
||||
.find({ project_id: sourceProjectId, thread_id: { $exists: true } })
|
||||
.toArray()
|
||||
const mapping = []
|
||||
if (rooms.length === 0) return mapping
|
||||
await db.rooms.insertMany(
|
||||
rooms.map(room => {
|
||||
const from = room._id
|
||||
|
||||
Reference in New Issue
Block a user