Explorar o código

refactor condition

Yuken Tezuka %!s(int64=3) %!d(string=hai) anos
pai
achega
7c4deeeb1d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/app/src/server/service/page.ts

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

@@ -2013,7 +2013,7 @@ class PageService {
     const originPage = await Page.findByPath(newPath, includeEmpty);
 
     // throw if any page already exists when recursively operation
-    if ((originPage != null && !originPage.isEmpty) || isRecursively === true) {
+    if (originPage != null && (!originPage.isEmpty || isRecursively === true)) {
       throw new PathAlreadyExistsError('already_exists', originPage.path);
     }