mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-22 11:52:03 +03:00
wip fix(core): writeProfile avoid deleting profile fields one by one
This commit is contained in:
parent
44c449bd4c
commit
30936b739e
@ -120,11 +120,10 @@ export class ProfilesService {
|
||||
async writeProfile (profile: PartialProfile<Profile>, saveConfig = true): Promise<void> {
|
||||
const cProfile = this.config.store.profiles.find(p => p.id === profile.id)
|
||||
if (cProfile) {
|
||||
// Fully replace the config
|
||||
for (const k in cProfile) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
||||
delete cProfile[k]
|
||||
if (!profile.group) {
|
||||
delete cProfile.group
|
||||
}
|
||||
|
||||
Object.assign(cProfile, profile)
|
||||
|
||||
if (saveConfig) {
|
||||
|
Loading…
Reference in New Issue
Block a user