xiaochan преди 1 година
родител
ревизия
6fcafaab8b
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      src/pinia/system-store.ts

+ 4 - 4
src/pinia/system-store.ts

@@ -52,11 +52,11 @@ export const useSystemStore = defineStore('system', {
     },
     actions: {
         merge() {
+            if (typeof this.userConfig === 'undefined') {
+                this.userConfig = userConfig
+                return
+            }
             for (let key in userConfig) {
-                if (typeof this.userConfig === 'undefined') {
-                    this.userConfig = userConfig
-                    return
-                }
                 if (!XEUtils.has(this.userConfig, key)) {
                     // @ts-ignore
                     this.userConfig[key] = userConfig[key];