Merge pull request #3673 from overleaf/jpa-handle-old-projects

[ProjectEditorHandler] process old projects gracefully

GitOrigin-RevId: eb7d3d776c2950bc13d02a9b9a4b2612f346e1c1
This commit is contained in:
Jakob Ackermann 2021-02-17 12:24:35 +00:00 committed by Copybot
parent 6443e00e34
commit a034b46db4

View file

@ -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