mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 05:33:43 +01:00
Merge pull request #2714 from overleaf/cmg-jpa-call-stack-exceeded
Stop call stack from being exceeding when adding many files GitOrigin-RevId: 1983b0c16cb279c6f173f614d541d16852664e24
This commit is contained in:
committed by
Copybot
parent
61e338fa7d
commit
0586f4d682
@@ -43,9 +43,13 @@ module.exports = ProjectRootDocManager = {
|
||||
ProjectEntityUpdateHandler.isPathValidForRootDoc(path) &&
|
||||
DocumentHelper.contentHasDocumentclass(doc.lines)
|
||||
) {
|
||||
return cb(doc._id)
|
||||
async.setImmediate(function() {
|
||||
cb(doc._id)
|
||||
})
|
||||
} else {
|
||||
return cb(null)
|
||||
async.setImmediate(function() {
|
||||
cb(null)
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -113,7 +113,7 @@ describe('ProjectRootDocManager', function() {
|
||||
})
|
||||
|
||||
describe('when the root doc is an Rtex file', function() {
|
||||
beforeEach(function() {
|
||||
beforeEach(function(done) {
|
||||
this.docs = {
|
||||
'/chapter1.tex': {
|
||||
_id: 'doc-id-1',
|
||||
@@ -129,7 +129,7 @@ describe('ProjectRootDocManager', function() {
|
||||
.callsArgWith(1, null, this.docs)
|
||||
return this.ProjectRootDocManager.setRootDocAutomatically(
|
||||
this.project_id,
|
||||
this.callback
|
||||
done
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user