Przeglądaj źródła

Merge pull request #5927 from weseek/fix/can-delete-logic-exception

fix: Server error due to the canDeleteLogic method
Yuki Takei 3 lat temu
rodzic
commit
6e082a177a
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      packages/app/src/server/service/page.ts

+ 1 - 1
packages/app/src/server/service/page.ts

@@ -262,7 +262,7 @@ class PageService {
       authority: IPageDeleteConfigValueToProcessValidation | null,
       recursiveAuthority: IPageDeleteConfigValueToProcessValidation | null,
   ): boolean {
-    const isAdmin = operator.admin;
+    const isAdmin = operator?.admin ?? false;
     const isOperator = operator?._id == null ? false : operator._id.equals(creatorId);
 
     if (isRecursively) {