potentially fix config corruption - #5355, #7874

This commit is contained in:
Eugene Pankov 2023-02-04 09:46:05 +01:00
parent 9e5c9ede44
commit 85bb7a2e95
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
2 changed files with 3 additions and 1 deletions

View File

@ -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)
}
}

View File

@ -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 {