fix(#1117): Sort env alphabetically

This commit is contained in:
Zomzog 2023-12-07 12:00:37 +01:00
parent 9f8dba0fb2
commit eaa448306b

View File

@ -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') {