Merge pull request #12375 from overleaf/jpa-fix-size

[docstore] initialize size with 0

GitOrigin-RevId: 9716cecb2ea87bb3596b3cdb64e9bd9f61dc86db
This commit is contained in:
Jakob Ackermann
2023-03-23 15:07:51 +00:00
committed by Copybot
parent 477181fc3a
commit 455bc207d0

View File

@@ -172,7 +172,7 @@ async function destroyProject(projectId) {
async function _streamToBuffer(projectId, docId, stream) {
const chunks = []
let size
let size = 0
let logged = false
const logIfTooLarge = finishedReading => {
if (size <= Settings.max_doc_length) return