From a034b46db4ee219cfb100380a5e588b3997d0649 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Wed, 17 Feb 2021 12:24:35 +0000 Subject: [PATCH] Merge pull request #3673 from overleaf/jpa-handle-old-projects [ProjectEditorHandler] process old projects gracefully GitOrigin-RevId: eb7d3d776c2950bc13d02a9b9a4b2612f346e1c1 --- services/web/app/src/Features/Project/ProjectEditorHandler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/web/app/src/Features/Project/ProjectEditorHandler.js b/services/web/app/src/Features/Project/ProjectEditorHandler.js index 4ba0f9f02a..8c00eefbfe 100644 --- a/services/web/app/src/Features/Project/ProjectEditorHandler.js +++ b/services/web/app/src/Features/Project/ProjectEditorHandler.js @@ -20,6 +20,9 @@ module.exports = ProjectEditorHandler = { buildProjectModelView(project, members, invites) { let owner, ownerFeatures + if (!Array.isArray(project.deletedDocs)) { + project.deletedDocs = [] + } project.deletedDocs.forEach(doc => { // The frontend does not use this field. delete doc.deletedAt