Browse Source

Исправление бага при обнулении libs

Book Pauk 2 years ago
parent
commit
be6b07a0cf
2 changed files with 3 additions and 3 deletions
  1. 2 2
      client/components/Reader/LibsPage/LibsPage.vue
  2. 1 1
      client/store/modules/reader.js

+ 2 - 2
client/components/Reader/LibsPage/LibsPage.vue

@@ -34,8 +34,8 @@ class LibsPage {
         if (!this.mode)
             return;
 
-        //TODO: убрать второе условие в 24г
-        if (!this.libs || (this.mode === 'omnireader' && this.libs.mode !== this.mode)) {
+        //TODO: убрать условие с mode в 24г
+        if (!this.libs || !this.libs.groups || (this.mode === 'omnireader' && this.libs.mode !== this.mode)) {
             const defaults = rstore.getLibsDefaults(this.mode);
             this.commit('reader/setLibs', defaults);
         }

+ 1 - 1
client/store/modules/reader.js

@@ -325,7 +325,7 @@ const state = {
     currentProfile: '',
     settings: _.cloneDeep(settingDefaults),
     settingsRev: {},
-    libs: false,
+    libs: {},
     libsRev: 0,
 };