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