Sfoglia il codice sorgente

potentially fix config corruption - #5355, #7874

Eugene Pankov 3 anni fa
parent
commit
85bb7a2e95
2 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 1 1
      app/lib/app.ts
  2. 2 0
      tabby-core/src/services/config.service.ts

+ 1 - 1
app/lib/app.ts

@@ -169,7 +169,7 @@ export class Application {
 
     broadcastExcept (event: string, except: WebContents, ...args: any[]): void {
         for (const window of this.windows) {
-            if (window.webContents.id === except.id) {
+            if (window.webContents.id !== except.id) {
                 window.send(event, ...args)
             }
         }

+ 2 - 0
tabby-core/src/services/config.service.ts

@@ -9,6 +9,7 @@ import { ConfigProvider } from '../api/configProvider'
 import { PlatformService } from '../api/platform'
 import { HostAppService } from '../api/hostApp'
 import { Vault, VaultService } from './vault.service'
+import { serializeFunction } from '../utils'
 const deepmerge = require('deepmerge')
 
 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
@@ -146,6 +147,7 @@ export class ConfigService {
             this.store.vault = vault.store
             this.save()
         })
+        this.save = serializeFunction(this.save.bind(this))
     }
 
     mergeDefaults (): unknown {