Explorar el Código

refactor condition

Yuken Tezuka hace 3 años
padre
commit
7c4deeeb1d
Se han modificado 1 ficheros con 1 adiciones y 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);
     }