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