Skip to content

Commit

Permalink
potentially fix config corruption - #5355, #7874
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Feb 4, 2023
1 parent 9e5c9ed commit 85bb7a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 2 additions & 0 deletions tabby-core/src/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -146,6 +147,7 @@ export class ConfigService {
this.store.vault = vault.store
this.save()
})
this.save = serializeFunction(this.save.bind(this))
}

mergeDefaults (): unknown {
Expand Down

0 comments on commit 85bb7a2

Please sign in to comment.