ignore fewer errors in profileSettingsTab

This commit is contained in:
Eugene Pankov 2021-11-21 17:51:32 +01:00
parent 176992a629
commit 2baede4675
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -102,17 +102,20 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
}
modal.componentInstance.profile = deepClone(profile)
modal.componentInstance.profileProvider = provider
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)
profile.type = provider.id
} catch (e) { }
const result = await modal.result.catch(() => null)
if (!result) {
return
}
// 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
}
async deleteProfile (profile: PartialProfile<Profile>): Promise<void> {