From ff34abaa4a9a0190de497c108304b5628229d6bc Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Mon, 16 Sep 2024 14:58:15 +0700 Subject: [PATCH] fix: check for deleted objects (#6581) Signed-off-by: Alexander Onnikov --- server-plugins/collaboration-resources/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server-plugins/collaboration-resources/src/index.ts b/server-plugins/collaboration-resources/src/index.ts index c9eda17a99..1a6673e8a9 100644 --- a/server-plugins/collaboration-resources/src/index.ts +++ b/server-plugins/collaboration-resources/src/index.ts @@ -33,6 +33,9 @@ export async function OnDelete ( // Obtain document being deleted const doc = removedMap.get(rmTx.objectId) + if (doc === undefined) { + return [] + } // Ids of files to delete from storage const toDelete: CollaborativeDoc[] = []