Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5cd0f8f9
Commit
5cd0f8f9
authored
Jun 22, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ported Comment Changes to EE
parent
42f31993
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
app/assets/javascripts/groups/stores/groups_store.js
app/assets/javascripts/groups/stores/groups_store.js
+3
-6
No files found.
app/assets/javascripts/groups/stores/groups_store.js
View file @
5cd0f8f9
...
...
@@ -63,9 +63,7 @@ export default class GroupsStore {
}
else
if
(
parentGroup
&&
parentGroup
.
id
===
currentGroup
.
parentId
)
{
tree
[
`id
${
currentGroup
.
id
}
`
]
=
currentGroup
;
}
else
{
// No parent found. We save it for later processing.
// We should put it inside a group where it's contained.
// e.g. If this group is `one / two / three` we are going to put it inside `one`
// No parent found. We save it for later processing
orphans
.
push
(
currentGroup
);
// Add to tree to preserve original order
...
...
@@ -79,7 +77,6 @@ export default class GroupsStore {
return
key
;
});
// Hopefully this array will be empty for most cases
if
(
orphans
.
length
)
{
orphans
.
map
((
orphan
)
=>
{
let
found
=
false
;
...
...
@@ -92,8 +89,8 @@ export default class GroupsStore {
// Make sure `group` exists since it can be deleted below
group
&&
currentOrphan
.
fullPath
.
lastIndexOf
(
group
.
fullPath
)
===
0
&&
// Make sure
is not the same we are not comparing the same group.
//
If we don't do this it will cause and infinite loop when rendering on vue
// Make sure
the currently selected orphan is not the same as the group
//
we are checking here otherwise it will end up in an infinite loop
currentOrphan
.
id
!==
group
.
id
)
{
group
.
subGroups
[
currentOrphan
.
id
]
=
currentOrphan
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment