summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-05-31 21:18:11 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2017-05-31 21:18:11 -0500
commit24b456e6a3e978965715d53243407d059e485bdb (patch)
tree8d4fb528a6eec21e4452754f32290377603dec63 /app
parent7feda1a354274c4672a95f965b59de3c40118ccb (diff)
downloadgitlab-ce-24b456e6a3e978965715d53243407d059e485bdb.tar.gz
Move line to a better place
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/groups/stores/groups_store.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/assets/javascripts/groups/stores/groups_store.js b/app/assets/javascripts/groups/stores/groups_store.js
index 06ef3b268e3..b6bc2a25776 100644
--- a/app/assets/javascripts/groups/stores/groups_store.js
+++ b/app/assets/javascripts/groups/stores/groups_store.js
@@ -52,10 +52,9 @@ export default class GroupsStore {
Object.keys(mappedGroups).map((key) => {
const currentGroup = mappedGroups[key];
- // If the group is not at the root level, add it to its parent array of subGroups.
- const findParentGroup = mappedGroups[currentGroup.parentId];
-
if (currentGroup.parentId) {
+ // If the group is not at the root level, add it to its parent array of subGroups.
+ const findParentGroup = mappedGroups[currentGroup.parentId];
if (findParentGroup) {
mappedGroups[currentGroup.parentId].subGroups[currentGroup.id] = currentGroup;
mappedGroups[currentGroup.parentId].isOpen = true; // Expand group if it has subgroups