diff --git a/services/web/app/src/Features/History/RestoreManager.js b/services/web/app/src/Features/History/RestoreManager.js index 316de88d82..cb1ade00d1 100644 --- a/services/web/app/src/Features/History/RestoreManager.js +++ b/services/web/app/src/Features/History/RestoreManager.js @@ -143,7 +143,11 @@ const RestoreManager = { userId ) - if (file.element._id.toString() === project.rootDoc_id.toString()) { + if ( + file.element._id && + project.rootDoc_id && + file.element._id.toString() === project.rootDoc_id.toString() + ) { hadDeletedRootFile = true }