mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #9961 from overleaf/em-fix-empty-name
Fix filetree entry with an empty name GitOrigin-RevId: 2fecdde67954472e1d34bccc1ccf7015a0b98752
This commit is contained in:
parent
567efe007f
commit
20a69289db
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ async function fixName(projectId, path) {
|
||||||
const existingNames = new Set(array.map(x => x.name))
|
const existingNames = new Set(array.map(x => x.name))
|
||||||
const name = findUniqueName(existingNames)
|
const name = findUniqueName(existingNames)
|
||||||
const result = await db.projects.updateOne(
|
const result = await db.projects.updateOne(
|
||||||
{ _id: projectId, [path]: { $exists: false } },
|
{ _id: projectId, [path]: { $in: [null, ''] } },
|
||||||
{ $set: { [path]: name } }
|
{ $set: { [path]: name } }
|
||||||
)
|
)
|
||||||
return result.modifiedCount
|
return result.modifiedCount
|
||||||
|
|
Loading…
Reference in a new issue