1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-20 17:38:20 +03:00

Merge pull request #4962 from highfredo/master

This commit is contained in:
Eugeny 2021-11-21 17:49:06 +01:00 committed by GitHub
commit 176992a629
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,18 +100,19 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
if (!provider) {
throw new Error('Cannot edit a profile without a provider')
}
modal.componentInstance.profile = Object.assign({}, profile)
modal.componentInstance.profile = deepClone(profile)
modal.componentInstance.profileProvider = provider
const result = await modal.result
try {
const result = await modal.result
// Fully replace the config
for (const k in profile) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete profile[k]
}
Object.assign(profile, result)
// Fully replace the config
for (const k in profile) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete profile[k]
}
Object.assign(profile, result)
profile.type = provider.id
profile.type = provider.id
} catch (e) { }
}
async deleteProfile (profile: PartialProfile<Profile>): Promise<void> {