mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix bug where connections edited in connection dialog moved to bottom of group (#2782)
This commit is contained in:
@@ -84,13 +84,14 @@ export class ConnectionConfig implements IConnectionConfig {
|
||||
return providerConnectionProfile.matches(connectionProfile);
|
||||
});
|
||||
if (sameProfileInList) {
|
||||
profiles = profiles.filter(value => value !== sameProfileInList);
|
||||
let profileIndex = profiles.findIndex(value => value === sameProfileInList);
|
||||
newProfile.id = sameProfileInList.id;
|
||||
connectionProfile.id = sameProfileInList.id;
|
||||
profiles[profileIndex] = newProfile;
|
||||
} else {
|
||||
profiles.push(newProfile);
|
||||
}
|
||||
|
||||
profiles.push(newProfile);
|
||||
|
||||
this.writeConfiguration(Constants.connectionsArrayName, profiles).then(() => {
|
||||
resolve(connectionProfile);
|
||||
}).catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user