1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-11 13:13:59 +03:00

Revert "wip fix(core): writeProfile avoid deleting profile fields one by one"

This reverts commit 30936b739e.
This commit is contained in:
Clem 2023-09-02 21:29:29 +02:00
parent cb71c79ecc
commit 0d0bde82a0

View File

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