diff --git a/src/webviews/settings/index.ts b/src/webviews/settings/index.ts index 91c90de98..cac75e6cd 100644 --- a/src/webviews/settings/index.ts +++ b/src/webviews/settings/index.ts @@ -368,7 +368,7 @@ export class SettingsUI { default: if (data.password) { - data.privateKeyPath = undefined; + delete data.privateKeyPath; if (data.password !== storedPassword) { // New password was entered, so store the password // and remove the private key path from the data @@ -382,6 +382,9 @@ export class SettingsUI { await ConnectionManager.deleteStoredPassword(context, name); vscode.window.showInformationMessage(t(`login.privateKey.updated`, name)); } + else{ + delete data.privateKeyPath; + } break; }