diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-05-12 03:43:39 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-05-12 03:43:39 -0500 |
commit | d55a9d4c6426b3c611def994525f065c8d12b514 (patch) | |
tree | 96030317170d9a89806c38dd9f0385a916219913 /app/assets | |
parent | 1604c7649376f228fc7e583bdaadc4fe07d50967 (diff) | |
download | gitlab-ce-d55a9d4c6426b3c611def994525f065c8d12b514.tar.gz |
Fix tree generation when filtering by name
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/groups/stores/groups_store.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/groups/stores/groups_store.js b/app/assets/javascripts/groups/stores/groups_store.js index bf43441bd71..1bfd8745423 100644 --- a/app/assets/javascripts/groups/stores/groups_store.js +++ b/app/assets/javascripts/groups/stores/groups_store.js @@ -33,7 +33,8 @@ export default class GroupsStore { Object.keys(mappedGroups).forEach((key) => { const currentGroup = mappedGroups[key]; // If the group is not at the root level, add it to its parent array of subGroups. - if (currentGroup.parentId) { + const parentGroup = mappedGroups[currentGroup['parentId']]; + if (currentGroup.parentId && parentGroup) { mappedGroups[currentGroup.parentId].subGroups[currentGroup.id] = currentGroup; mappedGroups[currentGroup.parentId].isOpen = true; // Expand group if it has subgroups } else { |