diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js index e360e26b..46c727f4 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js @@ -1224,6 +1224,7 @@ export const collectionsSlice = createSlice({ existingEnv.variables = environment.variables; } else { collection.environments.push(environment); + collection.environments.sort((a, b) => a.name.localeCompare(b.name)); const lastAction = collection.lastAction; if (lastAction && lastAction.type === 'ADD_ENVIRONMENT') {