From 07cd6b257a06ca10f9f95be191e5e218c4c589c2 Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Wed, 29 Apr 2020 10:48:17 +0100 Subject: [PATCH] Merge pull request #2787 from overleaf/spd-count-files Update file-count script for projects with no deleted-files array GitOrigin-RevId: 63b3af4f3c419ed032a6de8a90c680e1446ee422 --- services/web/scripts/count_files_in_projects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/scripts/count_files_in_projects.js b/services/web/scripts/count_files_in_projects.js index 5f51512a02..f5bae5152b 100644 --- a/services/web/scripts/count_files_in_projects.js +++ b/services/web/scripts/count_files_in_projects.js @@ -18,9 +18,9 @@ async function countFiles() { console.error( projectId, files.length, - project.deletedFiles.length, + (project.deletedFiles && project.deletedFiles.length) || 0, docs.length, - project.deletedDocs.length + (project.deletedDocs && project.deletedDocs.length) || 0 ) } catch (err) { if (err instanceof Errors.NotFoundError) {