mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
Merge pull request #8701 from overleaf/bg-simple-iterable-paths
simple iterable paths GitOrigin-RevId: f6906016888ccfc95c88858bdac4d2633fc1c5f4
This commit is contained in:
@@ -17,6 +17,7 @@ const ProjectLocator = require('./ProjectLocator')
|
||||
const FolderStructureBuilder = require('./FolderStructureBuilder')
|
||||
const SafePath = require('./SafePath')
|
||||
const { DeletedFile } = require('../../models/DeletedFile')
|
||||
const { iterablePaths } = require('./IterablePath')
|
||||
|
||||
const LOCK_NAMESPACE = 'mongoTransaction'
|
||||
const ENTITY_TYPE_TO_MONGO_PATH_SEGMENT = {
|
||||
@@ -494,7 +495,7 @@ function _countElements(project) {
|
||||
let total = 0
|
||||
if (folder.folders) {
|
||||
total += folder.folders.length
|
||||
for (const subfolder of folder.folders) {
|
||||
for (const subfolder of iterablePaths(folder, 'folders')) {
|
||||
total += countFolder(subfolder)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user