Taichi Masuyama 4 anni fa
parent
commit
85a237fa3e
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      packages/app/src/server/models/page.js

+ 2 - 2
packages/app/src/server/models/page.js

@@ -1068,7 +1068,6 @@ module.exports = function(crowi) {
     /*
      * v4 compatible
      */
-    let parent = parentId;
     if (!isV5Compatible) {
       const isExist = await this.count({ path });
 
@@ -1077,7 +1076,8 @@ module.exports = function(crowi) {
       }
     }
 
-    if (isV5Compatible && parentId == null) {
+    let parent = parentId;
+    if (isV5Compatible && parent == null) {
       // fill parent before saving the page
       parent = await Page._getParentIdAndFillAncestors(path);
     }