From eaa448306b5823031c537c2a00f7a2ff7ab586bc Mon Sep 17 00:00:00 2001 From: Zomzog Date: Thu, 7 Dec 2023 12:00:37 +0100 Subject: [PATCH] fix(#1117): Sort env alphabetically --- .../src/providers/ReduxStore/slices/collections/index.js | 1 + 1 file changed, 1 insertion(+) 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') {