Handle undefined rootDoc when restoring a file (#28118)

GitOrigin-RevId: f3aa32d2443f3fffbda8a10cc35d5dec3db71143
This commit is contained in:
Domagoj Kriskovic
2025-08-26 14:14:01 +02:00
committed by Copybot
parent 02dd2a511c
commit a43ca75a79

View File

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