Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Devclaim committed Oct 9, 2023
1 parent e5b990c commit b1a787a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/neos-ui-redux-store/src/UI/ContentTree/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const reducer = (state: State = defaultState, action: InitAction | Action
} else if (childrenCollapsedByDefault && draft.toggled.includes(child)) {
draft.toggled = draft.toggled.filter(i => i !== child);
}
})
});
} else if (draft.toggled.includes(contextPath)) {
draft.toggled = draft.toggled.filter(i => i !== contextPath);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/neos-ui-redux-store/src/UI/PageTree/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const reducer = (state: State = defaultState, action: InitAction | Action
} else if (childrenCollapsedByDefault && draft.toggled.includes(child)) {
draft.toggled = draft.toggled.filter(i => i !== child);
}
})
});
} else if (draft.toggled.includes(contextPath)) {
draft.toggled = draft.toggled.filter(i => i !== contextPath);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export default class Node extends PureComponent {
);
}

handleNodeToggle = (e) => {
handleNodeToggle = e => {
const {node, onNodeToggle, childNodes, isContentTreeNode, loadingDepth, rootNode} = this.props;
const children = [...childNodes];
const childrenLoaded = children[0] !== undefined;
Expand All @@ -364,11 +364,11 @@ export default class Node extends PureComponent {

if (childrenLoaded) {
childrenCollapsedByDefault = loadingDepth === 0 ? false : (node.depth + 1) - rootNode.depth >= loadingDepth;
const childrenWithChildren = children.filter((child) => child.children.length > (isContentTreeNode ? 0 : 1));
const childrenWithChildren = children.filter(child => child.children.length > (isContentTreeNode ? 0 : 1));

childrenWithChildren.forEach(child => {
childrenContextPaths.push(child.contextPath);
})
});
}

onNodeToggle(node.contextPath, e.shiftKey, childrenContextPaths, childrenCollapsedByDefault);
Expand Down

0 comments on commit b1a787a

Please sign in to comment.