itizawa 5 лет назад
Родитель
Сommit
54c079384c
2 измененных файлов с 5 добавлено и 1 удалено
  1. 4 0
      src/migrations/20200827045151-remove-layout-setting.js
  2. 1 1
      src/server/models/config.js

+ 4 - 0
src/migrations/20200827045151-remove-layout-setting.js

@@ -15,6 +15,10 @@ module.exports = {
 
 
     const layoutType = await Config.findOne({ key: 'customize:layout' });
     const layoutType = await Config.findOne({ key: 'customize:layout' });
 
 
+    if (layoutType == null) {
+      return;
+    }
+
     const promise = [
     const promise = [
       // remove layout
       // remove layout
       Config.findOneAndDelete({ key: 'customize:layout' }),
       Config.findOneAndDelete({ key: 'customize:layout' }),

+ 1 - 1
src/server/models/config.js

@@ -105,8 +105,8 @@ module.exports = function(crowi) {
       'customize:title' : undefined,
       'customize:title' : undefined,
       'customize:highlightJsStyle' : 'github',
       'customize:highlightJsStyle' : 'github',
       'customize:highlightJsStyleBorder' : false,
       'customize:highlightJsStyleBorder' : false,
-      'customize:layout' : 'growi',
       'customize:theme' : 'default',
       'customize:theme' : 'default',
+      'customize:layout' : 'growi',
       'customize:isEnabledTimeline' : true,
       'customize:isEnabledTimeline' : true,
       'customize:isSavedStatesOfTabChanges' : true,
       'customize:isSavedStatesOfTabChanges' : true,
       'customize:isEnabledAttachTitleHeader' : false,
       'customize:isEnabledAttachTitleHeader' : false,