Move line to a better place
This commit is contained in:
parent
7feda1a354
commit
24b456e6a3
1 changed files with 2 additions and 3 deletions
|
@ -52,10 +52,9 @@ export default class GroupsStore {
|
||||||
|
|
||||||
Object.keys(mappedGroups).map((key) => {
|
Object.keys(mappedGroups).map((key) => {
|
||||||
const currentGroup = mappedGroups[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 (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) {
|
if (findParentGroup) {
|
||||||
mappedGroups[currentGroup.parentId].subGroups[currentGroup.id] = currentGroup;
|
mappedGroups[currentGroup.parentId].subGroups[currentGroup.id] = currentGroup;
|
||||||
mappedGroups[currentGroup.parentId].isOpen = true; // Expand group if it has subgroups
|
mappedGroups[currentGroup.parentId].isOpen = true; // Expand group if it has subgroups
|
||||||
|
|
Loading…
Reference in a new issue