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:
commit
176992a629
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user