Commit e76d4f5f authored by Filipa Lacerda's avatar Filipa Lacerda

Fix filtering environments for deploy boards

parent 86c2d0de
...@@ -46,15 +46,15 @@ class EnvironmentsStore { ...@@ -46,15 +46,15 @@ class EnvironmentsStore {
let filtered = {}; let filtered = {};
if (env.latest) { if (env.latest) {
filtered = Object.assign(filtered, env, env.latest); filtered = Object.assign({}, env, env.latest);
delete filtered.latest; delete filtered.latest;
} else { } else {
filtered = Object.assign(filtered, env); filtered = Object.assign({}, env);
} }
if (env.size > 1) { if (filtered.size > 1) {
filtered = Object.assign(filtered, env, { isFolder: true, folderName: env.name }); filtered = Object.assign(filtered, env, { isFolder: true, folderName: env.name });
} else if (env.size === 1 && env.rollout_status) { } else if (filtered.size === 1 && filtered.rollout_status) {
filtered = Object.assign(filtered, env, { filtered = Object.assign(filtered, env, {
hasDeployBoard: true, hasDeployBoard: true,
isDeployBoardVisible: false, isDeployBoardVisible: false,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment