Просмотр исходного кода

Fixed shouldUseV4Process method

Taichi Masuyama 4 лет назад
Родитель
Сommit
6d5c604fd5

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

@@ -293,7 +293,7 @@ class PageService {
     const isRoot = isTopPage(page.path);
     const isRoot = isTopPage(page.path);
     const isPageRestricted = page.grant === Page.GRANT_RESTRICTED;
     const isPageRestricted = page.grant === Page.GRANT_RESTRICTED;
 
 
-    const shouldUseV4Process = isTrashPage && !isRoot && !isPageRestricted && (!isV5Compatible || !isPageMigrated);
+    const shouldUseV4Process = !isRoot && !isPageRestricted && (!isV5Compatible || !isPageMigrated || isTrashPage);
 
 
     return shouldUseV4Process;
     return shouldUseV4Process;
   }
   }

+ 1 - 0
packages/app/test/integration/service/page.test.js

@@ -59,6 +59,7 @@ describe('PageService', () => {
 
 
   beforeAll(async() => {
   beforeAll(async() => {
     crowi = await getInstance();
     crowi = await getInstance();
+    await crowi.configManager.updateConfigsInTheSameNamespace('crowi', { 'app:isV5Compatible': null });
 
 
     User = mongoose.model('User');
     User = mongoose.model('User');
     Page = mongoose.model('Page');
     Page = mongoose.model('Page');